Commit d7d9c8b5 authored by yann300's avatar yann300

fix browser test && rename module

parent 86eb049a
...@@ -2,12 +2,12 @@ export default { ...@@ -2,12 +2,12 @@ export default {
start: (appStore, swapPanelApi, verticalIconApi, mainPanelApi, resizeFeature) => { start: (appStore, swapPanelApi, verticalIconApi, mainPanelApi, resizeFeature) => {
swapPanelApi.event.on('toggle', (moduleName) => { swapPanelApi.event.on('toggle', (moduleName) => {
resizeFeature.panel1.clientWidth !== 0 ? resizeFeature.minimize() : resizeFeature.maximise() resizeFeature.panel1.clientWidth !== 0 ? resizeFeature.minimize() : resizeFeature.maximise()
if (moduleName === 'file explorers') { if (moduleName === 'fileExplorers') {
mainPanelApi.showContent('code editor') mainPanelApi.showContent('code editor')
} }
}) })
swapPanelApi.event.on('showing', (moduleName) => { swapPanelApi.event.on('showing', (moduleName) => {
if (moduleName === 'file explorers') { if (moduleName === 'fileExplorers') {
mainPanelApi.showContent('code editor') mainPanelApi.showContent('code editor')
} }
resizeFeature.panel1.clientWidth === 0 ? resizeFeature.maximise() : '' resizeFeature.panel1.clientWidth === 0 ? resizeFeature.maximise() : ''
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
}) })
// mainPanelApi.event.on('showing', (moduleName) => {}) // mainPanelApi.event.on('showing', (moduleName) => {})
verticalIconApi.select('file explorers') verticalIconApi.select('fileExplorers')
verticalIconApi.select('homepage') verticalIconApi.select('homepage')
resizeFeature.minimize() resizeFeature.minimize()
} }
......
...@@ -50,14 +50,14 @@ function getCompiledContracts (browser, compiled, callback) { ...@@ -50,14 +50,14 @@ function getCompiledContracts (browser, compiled, callback) {
} }
function selectContract (browser, contractName, callback) { function selectContract (browser, contractName, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('run transactions') browser.clickLaunchIcon('settings').clickLaunchIcon('run')
.setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => { .setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => {
callback() callback()
}) })
} }
function createContract (browser, inputParams, callback) { function createContract (browser, inputParams, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('run transactions') browser.clickLaunchIcon('settings').clickLaunchIcon('run')
.setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () { .setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () {
browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() }) browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() })
}) })
...@@ -217,7 +217,7 @@ function setEditorValue (value, callback) { ...@@ -217,7 +217,7 @@ function setEditorValue (value, callback) {
} }
function addInstance (browser, address, isValidFormat, isValidChecksum, callback) { function addInstance (browser, address, isValidFormat, isValidChecksum, callback) {
browser.clickLaunchIcon('run transactions').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () { browser.clickLaunchIcon('run').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () {
browser.click('div[class^="atAddress"]') browser.click('div[class^="atAddress"]')
.execute(function () { .execute(function () {
var ret = document.querySelector('div[class^="modalBody"] div').innerHTML var ret = document.querySelector('div[class^="modalBody"] div').innerHTML
...@@ -265,7 +265,7 @@ function modalFooterOKClick () { ...@@ -265,7 +265,7 @@ function modalFooterOKClick () {
} }
function addFile (browser, name, content, done) { function addFile (browser, name, content, done) {
browser.clickLaunchIcon('run transactions').clickLaunchIcon('file explorers').click('.newFile') browser.clickLaunchIcon('run').clickLaunchIcon('fileExplorers').click('.newFile')
.perform((client, done) => { .perform((client, done) => {
browser.execute(function (fileName) { browser.execute(function (fileName) {
if (fileName !== 'Untitled.sol') { if (fileName !== 'Untitled.sol') {
...@@ -372,7 +372,7 @@ function useFilter (browser, filter, test, done) { ...@@ -372,7 +372,7 @@ function useFilter (browser, filter, test, done) {
} }
function switchFile (browser, name, done) { function switchFile (browser, name, done) {
browser.clickLaunchIcon('settings').clickLaunchIcon('file explorers') browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers')
.click('li[key="' + name + '"]') .click('li[key="' + name + '"]')
.pause(2000) .pause(2000)
.perform(() => { .perform(() => {
......
...@@ -22,10 +22,10 @@ function initModules (browser, callback) { ...@@ -22,10 +22,10 @@ function initModules (browser, callback) {
document.querySelector('div[title="pluginManager"]').scrollTop = document.querySelector('div[title="pluginManager"]').scrollHeight document.querySelector('div[title="pluginManager"]').scrollTop = document.querySelector('div[title="pluginManager"]').scrollHeight
}, [], function () { }, [], function () {
browser.click('#pluginManager div[title="solidity"] button') browser.click('#pluginManager div[title="solidity"] button')
.click('#pluginManager div[title="run transactions"] button') .click('#pluginManager div[title="run"] button')
.click('#pluginManager div[title="solidity static analysis"] button') .click('#pluginManager div[title="solidityStaticAnalysis"] button')
.click('#pluginManager div[title="debugger"] button') .click('#pluginManager div[title="debugger"] button')
.click('#icon-panel div[title="file explorers"]') .click('#icon-panel div[title="fileExplorers"]')
.perform(() => { callback() }) .perform(() => { callback() })
}) })
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment