Unverified Commit eaee07a0 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #2907 from ethereum/ci-fix

Ci fix
parents fd94c426 9934a3ff
...@@ -22,7 +22,9 @@ setupRemixd ...@@ -22,7 +22,9 @@ setupRemixd
sleep 5 sleep 5
TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings) TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings)
npm run nightwatch_local_chrome $TESTFILES for TESTFILE in $TESTFILES; do
./node_modules/.bin/nightwatch --config nightwatch.js --env chrome $TESTFILE || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE" echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ] if [ "$TEST_EXITCODE" -eq 1 ]
......
...@@ -22,7 +22,9 @@ setupRemixd ...@@ -22,7 +22,9 @@ setupRemixd
sleep 5 sleep 5
TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings) TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings)
npm run nightwatch_local_firefox $TESTFILES for TESTFILE in $TESTFILES; do
./node_modules/.bin/nightwatch --config nightwatch.js --env firefox $TESTFILE || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE" echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ] if [ "$TEST_EXITCODE" -eq 1 ]
......
...@@ -2,7 +2,8 @@ const EventEmitter = require('events') ...@@ -2,7 +2,8 @@ const EventEmitter = require('events')
class ClickLaunchIcon extends EventEmitter { class ClickLaunchIcon extends EventEmitter {
command (icon) { command (icon) {
this.api.waitForElementVisible('#icon-panel div[plugin="' + icon + '"]').click('#icon-panel div[plugin="' + icon + '"]').perform(() => { this.api.waitForElementVisible('#icon-panel div[plugin="' + icon + '"]').click('#icon-panel div[plugin="' + icon + '"]').perform((done) => {
done()
this.emit('complete') this.emit('complete')
}) })
return this return this
......
...@@ -14,27 +14,24 @@ module.exports = function (browser, callback, url, preloadPlugins = true) { ...@@ -14,27 +14,24 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {
.execute(() => { .execute(() => {
document.getElementById('autoCompile').click() document.getElementById('autoCompile').click()
}) })
.perform(function () {
callback()
})
}) })
} else callback() }
}) })
}) })
.perform(() => {
callback()
})
} }
function initModules (browser, callback) { function initModules (browser, callback) {
browser.pause(5000) browser.pause(5000)
.click('#icon-panel div[plugin="pluginManager"]') .click('[data-id="verticalIconsKindpluginManager"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button') .scrollAndClick('[data-id="pluginManagerComponentActivateButtonsolidityStaticAnalysis"]')
.pause(5000) .scrollAndClick('[data-id="pluginManagerComponentActivateButtondebugger"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_udapp"] button') .scrollAndClick('[data-id="verticalIconsKindfileExplorers"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
.scrollAndClick('#icon-panel div[plugin="fileExplorers"]')
.clickLaunchIcon('settings') .clickLaunchIcon('settings')
.setValue('#gistaccesstoken', process.env.gist_token) .setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token)
.click('#savegisttoken') .click('[data-id="settingsTabSaveGistToken"]')
.click('#settingsView #Flatly') // e2e tests were initially developed with Flatly. Some tests are failing with the default one (Dark), because the dark theme put uppercase everywhere. .click('[data-id="settingsTabThemeFlatly"]') // e2e tests were initially developed with Flatly. Some tests are failing with the default one (Dark), because the dark theme put uppercase everywhere.
.perform(() => { callback() }) .perform(() => { callback() })
} }
...@@ -23,7 +23,7 @@ module.exports = { ...@@ -23,7 +23,7 @@ module.exports = {
.execute(() => { .execute(() => {
document.getElementById('nightlies').checked = true document.getElementById('nightlies').checked = true
}) })
.noWorkerErrorFor('soljson-v0.3.4+commit.7dab890.js') .noWorkerErrorFor('soljson-v0.3.4+commit.7dab8902.js')
.noWorkerErrorFor('soljson-v0.6.5+commit.f956cc89.js') .noWorkerErrorFor('soljson-v0.6.5+commit.f956cc89.js')
.noWorkerErrorFor('soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js') .noWorkerErrorFor('soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js')
.noWorkerErrorFor('soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js') .noWorkerErrorFor('soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js')
...@@ -31,6 +31,7 @@ module.exports = { ...@@ -31,6 +31,7 @@ module.exports = {
.execute(() => { .execute(() => {
document.getElementById('nightlies').checked = false document.getElementById('nightlies').checked = false
}) })
.end()
}, },
tearDown: sauce tearDown: sauce
......
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