reset add file

pull/2868/head
filip mertens 2 years ago
parent c0e75c375a
commit 60360112f8
  1. 5
      apps/remix-ide-e2e/src/commands/addFile.ts
  2. 2
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  3. 1
      apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
  4. 2
      apps/remix-ide/ci/browser_test.sh

@ -36,6 +36,7 @@ function addFile(browser: NightwatchBrowser, name: string, content: NightwatchCo
timeout: 2000 timeout: 2000
}, (okVisible) => { }, (okVisible) => {
// @ts-ignore // @ts-ignore
// status === -1 means the element is not visible, 0 means it is visible
if (okVisible.status === 0) { if (okVisible.status === 0) {
browser.openFile(name) browser.openFile(name)
.perform(function () { .perform(function () {
@ -46,8 +47,10 @@ function addFile(browser: NightwatchBrowser, name: string, content: NightwatchCo
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000) .waitForElementContainsText('*[data-id$="/blank"]', '', 60000)
.sendKeys('*[data-id$="/blank"] .remixui_items', name) .sendKeys('*[data-id$="/blank"] .remixui_items', name)
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible({ .isVisible({
selector: `li[data-id="treeViewLitreeViewItem${name}"]`, selector: `li[data-id="treeViewLitreeViewItem${name}"]`,
abortOnFailure: false,
suppressNotFoundErrors: true,
timeout: 60000 timeout: 60000
}) })
.setEditorValue(content.content) .setEditorValue(content.content)

@ -131,7 +131,7 @@ module.exports = {
.click('*[data-id="scConfigExpander"]') .click('*[data-id="scConfigExpander"]')
.waitForElementVisible('*[data-id="scFileConfiguration"]', 10000) .waitForElementVisible('*[data-id="scFileConfiguration"]', 10000)
.click('*[data-id="scFileConfiguration"]') .click('*[data-id="scFileConfiguration"]')
// the input field behaves badly, it would often not receive the value, so retrying it a few times for now is the best thing to do
.waitForElementVisible({ .waitForElementVisible({
selector: '*[data-id="scConfigChangeFilePath"]', selector: '*[data-id="scConfigChangeFilePath"]',
abortOnFailure: false abortOnFailure: false

@ -29,6 +29,7 @@ module.exports = {
}, },
'Using Web Worker #group1': function (browser: NightwatchBrowser) { 'Using Web Worker #group1': function (browser: NightwatchBrowser) {
browser browser
// using autocompile when switching compilers quickly confuses the process and results in a wrong compiler version being used or results displayed
.waitForElementVisible('[for="autoCompile"]') .waitForElementVisible('[for="autoCompile"]')
.click('[for="autoCompile"]') .click('[for="autoCompile"]')
.waitForElementVisible('[data-id="compilerNightliesBuild"]') .waitForElementVisible('[data-id="compilerNightliesBuild"]')

@ -21,7 +21,7 @@ yarn run build:e2e
node apps/remix-ide/ci/splice_tests.js $2 $3 node apps/remix-ide/ci/splice_tests.js $2 $3
TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | circleci tests split --split-by=timings) TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1 npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js ${TESTFILE}.js --env=$1 || TEST_EXITCODE=1
done done
echo "$TEST_EXITCODE" echo "$TEST_EXITCODE"

Loading…
Cancel
Save