From 2d9b4b285cb344da0e00fd7cbaba7828bbee6f26 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 20 Mar 2023 16:47:46 +0100 Subject: [PATCH] data-path --- apps/remix-ide-e2e/src/tests/defaultLayout.test.ts | 2 +- apps/remix-ide-e2e/src/tests/importFromGithub.test.ts | 4 ++-- apps/remix-ide-e2e/src/tests/search.test.ts | 4 ++-- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts index ae1f51af60..fb03f0ce35 100644 --- a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts +++ b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts @@ -66,7 +66,7 @@ module.exports = { .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') .click('[data-id="treeViewLitreeViewItemcontracts"]') .openFile('contracts/3_Ballot.sol') - .assert.containsText('div[title="default_workspace/contracts/3_Ballot.sol"]', '3_Ballot.sol') + .assert.containsText('div[data-path="default_workspace/contracts/3_Ballot.sol"]', '3_Ballot.sol') .end() } } diff --git a/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts b/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts index e47accec38..025b5f1dd3 100644 --- a/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts +++ b/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts @@ -18,7 +18,7 @@ module.exports = { browser.clickLaunchIcon('home') .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .clickLaunchIcon('filePanel') - .click('div[title="Remix Home"]') + .click('div[data-id="verticalIconsHomeIcon"]') .waitForElementVisible('button[data-id="landingPageImportFromGitHubButton"]') .pause(1000) .click('button[data-id="landingPageImportFromGitHubButton"]') @@ -78,7 +78,7 @@ module.exports = { .waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]') .click('[data-id="homeTab-modal-footer-ok-react"]') .openFile('github/ethereum/remix-project/package.json') - .waitForElementVisible("div[title='default_workspace/github/ethereum/remix-project/package.json'") + .waitForElementVisible("div[@data-path='default_workspace/github/ethereum/remix-project/package.json'") .getEditorValue((content) => { browser.assert.ok(content.indexOf('"name": "remix-project",') !== -1, 'content does contain "name": "remix-project"') }) diff --git a/apps/remix-ide-e2e/src/tests/search.test.ts b/apps/remix-ide-e2e/src/tests/search.test.ts index c91531d587..905aa839f6 100644 --- a/apps/remix-ide-e2e/src/tests/search.test.ts +++ b/apps/remix-ide-e2e/src/tests/search.test.ts @@ -150,14 +150,14 @@ module.exports = { browser.assert.ok(content.includes("123test' contract"), 'should replace text ok') }) .waitForElementVisible('*[data-id="undo-replace-README.txt"]') - .click('div[title="default_workspace/contracts/1_Storage.sol"]').pause(2000) + .click('div[data-path="default_workspace/contracts/1_Storage.sol"]').pause(2000) .waitForElementVisible('*[data-id="undo-replace-contracts/1_Storage.sol"]') .click('*[data-id="undo-replace-contracts/1_Storage.sol"]').pause(2000) .getEditorValue((content) => { browser.assert.ok(content.includes('contract Storage'), 'should undo text ok') browser.assert.ok(content.includes('title Storage'), 'should undo text ok') }) - .click('div[title="default_workspace/README.txt"]').pause(2000) + .click('div[data-path="default_workspace/README.txt"]').pause(2000) .waitForElementVisible('*[data-id="undo-replace-README.txt"]') .click('*[data-id="undo-replace-README.txt"]').pause(2000) .getEditorValue((content) => { diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 4dc1d89b6b..17e340cd2d 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -48,7 +48,7 @@ module.exports = { .waitForElementPresent('*[data-id="testTabGenerateTestFile"]') .click('*[data-id="testTabGenerateTestFile"]') .clickLaunchIcon('filePanel') - .waitForElementPresent('*[title="default_workspace/tests/simple_storage_test.sol"]') + .waitForElementPresent('*[data-path="default_workspace/tests/simple_storage_test.sol"]') .removeFile('tests/simple_storage_test.sol', 'default_workspace') }, @@ -106,7 +106,7 @@ module.exports = { 'Should fail on compilation, open file on error click, not disappear error #group2': function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .addFile('tests/compilationError_test.sol', sources[0]['compilationError_test.sol']) - .click('div[title="default_workspace/tests/compilationError_test.sol"] span[class="close-tabs"]') + .click('div[data-path="default_workspace/tests/compilationError_test.sol"] span[class="close-tabs"]') .clickLaunchIcon('solidityUnitTesting') .pause(2000) .click('*[data-id="testTabCheckAllTests"]')