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

@ -131,7 +131,7 @@ module.exports = {
.click('*[data-id="scConfigExpander"]')
.waitForElementVisible('*[data-id="scFileConfiguration"]', 10000)
.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({
selector: '*[data-id="scConfigChangeFilePath"]',
abortOnFailure: false

@ -29,6 +29,7 @@ module.exports = {
},
'Using Web Worker #group1': function (browser: NightwatchBrowser) {
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"]')
.click('[for="autoCompile"]')
.waitForElementVisible('[data-id="compilerNightliesBuild"]')

@ -21,7 +21,7 @@ yarn run build:e2e
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)
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
echo "$TEST_EXITCODE"

Loading…
Cancel
Save