Modified data-attribute selector

pull/5370/head
ioedeveloper 5 years ago
parent 08a1c938ed
commit d8889948fd
  1. 92
      test-browser/tests/plugin.js

@ -8,83 +8,83 @@ module.exports = {
},
'Should Load Plugin Manager': function (browser) {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]')
.pause(3000)
.click('div[plugin="pluginManager"]')
.waitForElementVisible('div[data-id="pluginManagerComponentPluginManager"]')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'PLUGIN MANAGER')
.click('*[plugin="pluginManager"]')
.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]')
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'PLUGIN MANAGER')
},
'Should Search for plugins': function (browser) {
browser.waitForElementVisible('div[data-id="pluginManagerComponentPluginManager"]')
.click('input[data-id="pluginManagerComponentSearchInput"]')
browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]')
.click('*[data-id="pluginManagerComponentSearchInput"]')
.keys('debugger')
.waitForElementVisible('button[data-id="pluginManagerComponentActivateButtondebugger"]')
.clearValue('input[data-id="pluginManagerComponentSearchInput"]')
.click('input[data-id="pluginManagerComponentSearchInput"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]')
.clearValue('*[data-id="pluginManagerComponentSearchInput"]')
.click('*[data-id="pluginManagerComponentSearchInput"]')
.keys('Deploy & run transactions')
.waitForElementVisible('button[data-id="pluginManagerComponentActivateButtonudapp"]')
.clearValue('input[data-id="pluginManagerComponentSearchInput"]')
.click('input[data-id="pluginManagerComponentSearchInput"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonudapp"]')
.clearValue('*[data-id="pluginManagerComponentSearchInput"]')
.click('*[data-id="pluginManagerComponentSearchInput"]')
.keys('ZoKrates')
.waitForElementVisible('button[data-id="pluginManagerComponentActivateButtonZoKrates"]')
.clearValue('input[data-id="pluginManagerComponentSearchInput"]')
.click('input[data-id="pluginManagerComponentSearchInput"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonZoKrates"]')
.clearValue('*[data-id="pluginManagerComponentSearchInput"]')
.click('*[data-id="pluginManagerComponentSearchInput"]')
.keys(browser.Keys.ENTER)
},
'Should activate plugins': function (browser) {
browser.waitForElementVisible('div[data-id="pluginManagerComponentPluginManager"]')
.click('div[data-id="pluginManagerComponentPluginManager"]')
.scrollAndClick('button[data-id="pluginManagerComponentActivateButtondebugger"]')
.waitForElementVisible('button[data-id="pluginManagerComponentDeactivateButtondebugger"]')
.scrollAndClick('button[data-id="pluginManagerComponentActivateButtonudapp"]')
.waitForElementVisible('button[data-id="pluginManagerComponentDeactivateButtonudapp"]')
.scrollAndClick('button[data-id="pluginManagerComponentActivateButtonZoKrates"]')
.waitForElementVisible('button[data-id="pluginManagerComponentDeactivateButtonZoKrates"]')
browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]')
.click('*[data-id="pluginManagerComponentPluginManager"]')
.scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]')
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]')
.scrollAndClick('*[data-id="pluginManagerComponentActivateButtonudapp"]')
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonudapp"]')
.scrollAndClick('*[data-id="pluginManagerComponentActivateButtonZoKrates"]')
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonZoKrates"]')
},
'Should deactivate plugins': function (browser) {
browser.waitForElementVisible('div[data-id="pluginManagerComponentPluginManager"]')
.click('div[data-id="pluginManagerComponentPluginManager"]')
.scrollAndClick('button[data-id="pluginManagerComponentDeactivateButtondebugger"]')
.waitForElementVisible('button[data-id="pluginManagerComponentActivateButtondebugger"]')
.scrollAndClick('button[data-id="pluginManagerComponentDeactivateButtonudapp"]')
.waitForElementVisible('button[data-id="pluginManagerComponentActivateButtonudapp"]')
browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]')
.click('*[data-id="pluginManagerComponentPluginManager"]')
.scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtondebugger"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]')
.scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtonudapp"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonudapp"]')
},
'Grant plugin permission (ZOKRATES)': function (browser) {
browser.waitForElementVisible('div[data-id="pluginManagerComponentPluginManager"]')
.click('button[data-id="pluginManagerSettingsButton"]')
.waitForElementVisible('form[data-id="pluginManagerSettingsPermissionForm"]')
.assert.containsText('form[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]')
.click('*[data-id="pluginManagerSettingsButton"]')
.waitForElementVisible('*[data-id="pluginManagerSettingsPermissionForm"]')
.assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
.modalFooterOKClick()
.click('div[data-id="verticalIconsFileExplorerIcons"]')
.click('*[data-id="verticalIconsFileExplorerIcons"]')
.switchFile('browser/3_Ballot.sol')
.click('div[plugin="ZoKrates"]')
.click('*[plugin="ZoKrates"]')
.pause(5000)
.frame(0)
.useXpath().click("//span[text()='Compile']")
.frameParent()
.useCss().waitForElementVisible('div[data-id="modalDialogContainer"]')
.assert.containsText('h4[data-id="permissionHandlerMessage"]', 'ZOKRATES" WOULD LIKE TO ACCESS "FILE MANAGER" :')
.useCss().waitForElementVisible('*[data-id="modalDialogContainer"]')
.assert.containsText('*[data-id="permissionHandlerMessage"]', 'ZOKRATES" WOULD LIKE TO ACCESS "FILE MANAGER" :')
.pause(2000)
.click('label[data-id="permissionHandlerRememberChoice"]')
.click('*[data-id="permissionHandlerRememberChoice"]')
.pause(2000)
.modalFooterOKClick()
},
'Revert plugin permission (ZOKRATES)': function (browser) {
browser.waitForElementVisible('div[data-id="verticalIconsSettingsIcons"]')
.click('div[data-id="verticalIconsSettingsIcons"]')
.waitForElementVisible('button[data-id="pluginManagerSettingsButton"]')
.click('button[data-id="pluginManagerSettingsButton"]')
.waitForElementVisible('div[data-id="modalDialogContainer"]')
.click('form[data-id="pluginManagerSettingsPermissionForm"]')
browser.waitForElementVisible('*[data-id="verticalIconsSettingsIcons"]')
.click('*[data-id="verticalIconsSettingsIcons"]')
.waitForElementVisible('*[data-id="pluginManagerSettingsButton"]')
.click('*[data-id="pluginManagerSettingsButton"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.click('*[data-id="pluginManagerSettingsPermissionForm"]')
.pause(2000)
.click('i[data-id="pluginManagerSettingsClearAllPermission"]')
.click('*[data-id="pluginManagerSettingsClearAllPermission"]')
.pause(2000)
.assert.containsText('form[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
.assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
.modalFooterOKClick()
.end()
},

Loading…
Cancel
Save