From 73ffc8029c8658a37686113b6ff3805067305957 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 27 Sep 2021 11:20:00 +0200 Subject: [PATCH] fix tests --- apps/remix-ide-e2e/src/tests/defaultLayout.test.ts | 8 ++++---- apps/remix-ide-e2e/src/tests/editor.spec.ts | 4 ++-- apps/remix-ide-e2e/src/tests/generalSettings.test.ts | 2 +- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 6 +++--- apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 2 +- apps/remix-ide-e2e/src/tests/workspace.test.ts | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts index 94bc20207d..d00288d038 100644 --- a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts +++ b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts @@ -19,9 +19,9 @@ module.exports = { browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemcontracts"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemscripts"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItem/contracts"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItem/scripts"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItem/tests"]') .waitForElementVisible('[data-id="treeViewLitreeViewItemREADME.txt"]') }, @@ -60,7 +60,7 @@ module.exports = { 'Switch Tabs using tabs icon': function (browser: NightwatchBrowser) { browser .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') - .click('[data-id="treeViewLitreeViewItemcontracts"]') + .click('[data-id="treeViewLitreeViewItem/contracts"]') .openFile('contracts/3_Ballot.sol') .assert.containsText('div[title="default_workspace/contracts/3_Ballot.sol"]', '3_Ballot.sol') .click('span[class^=dropdownCaret]') diff --git a/apps/remix-ide-e2e/src/tests/editor.spec.ts b/apps/remix-ide-e2e/src/tests/editor.spec.ts index 83d4f23f8f..f0b03f9fec 100644 --- a/apps/remix-ide-e2e/src/tests/editor.spec.ts +++ b/apps/remix-ide-e2e/src/tests/editor.spec.ts @@ -105,8 +105,8 @@ module.exports = { .click('li[data-id="treeViewLitreeViewItemremoveSourcehighlightScript.js"]') .pause(2000) .executeScript('remix.exeCurrent()') - .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts"]') - .click('li[data-id="treeViewLitreeViewItemcontracts"]') + .waitForElementVisible('li[data-id="treeViewLitreeViewItem/contracts"]') + .click('li[data-id="treeViewLitreeViewItem/contracts"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .waitForElementNotPresent('.highlightLine32', 60000) diff --git a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts index b79d2e5054..1011fa4995 100644 --- a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts +++ b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts @@ -20,7 +20,7 @@ module.exports = { .waitForElementVisible('*[data-id="settingsTabGenerateContractMetadataLabel"]', 5000) .verify.elementPresent('[data-id="settingsTabGenerateContractMetadata"]:checked') .click('*[data-id="verticalIconsFileExplorerIcons"]') - .click('[data-id="treeViewLitreeViewItemcontracts"]') + .click('[data-id="treeViewLitreeViewItem/contracts"]') .openFile('contracts/3_Ballot.sol') .click('*[data-id="verticalIconsKindsolidity"]') .pause(2000) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 03987555c5..bb6e88a4b5 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -15,7 +15,7 @@ module.exports = { browser .waitForElementVisible('#icon-panel', 10000) .clickLaunchIcon('filePanel') - .click('[data-id="treeViewLitreeViewItemcontracts"]') + .click('[data-id="treeViewLitreeViewItem/contracts"]') .openFile('contracts/3_Ballot.sol') .verifyContracts(['Ballot']) .click('#publishOnIpfs') @@ -71,8 +71,8 @@ module.exports = { 'Should remember choice after page refresh': function (browser: NightwatchBrowser) { browser .refresh() - .waitForElementVisible('[data-id="treeViewLitreeViewItemcontracts"]') - .click('[data-id="treeViewLitreeViewItemcontracts"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItem/contracts"]') + .click('[data-id="treeViewLitreeViewItem/contracts"]') .openFile('contracts/1_Storage.sol') .clickLaunchIcon('udapp') .waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]') diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts index da986f4898..3cd92fa5d0 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts @@ -176,7 +176,7 @@ module.exports = { browser .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .clickLaunchIcon('filePanel') - .click('*[data-id="treeViewLitreeViewItemcontracts"]') + .click('*[data-id="treeViewLitreeViewItem/contracts"]') .openFile('contracts/3_Ballot.sol') .clickLaunchIcon('solidityUnitTesting') .pause(2000) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 7dba664d6b..11b57ed25b 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -38,7 +38,7 @@ module.exports = { // eslint-disable-next-line dot-notation .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name' }) .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') - .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItem/tests"]') .addFile('test.sol', { content: 'test' }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]') .click('*[data-id="workspaceCreate"]') // create workspace_name_1 @@ -46,16 +46,16 @@ module.exports = { // eslint-disable-next-line dot-notation .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name_1' }) .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') - .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItem/tests"]') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') .click('*[data-id="workspacesSelect"] option[value="workspace_name"]') - .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItem/tests"]') }, 'Should rename a workspace': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceRename"]') // rename workspace_name - .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItem/tests"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextRename"]') // eslint-disable-next-line dot-notation .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextRename"]')['value'] = 'workspace_name_renamed' })