From a28fa17c3fd9dff5b335f21e73a0513a6e176097 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 3 Nov 2022 08:20:53 +0100 Subject: [PATCH] flaky switch --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index b36f2728e6..8085ebab7e 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -33,7 +33,7 @@ module.exports = { // WORKSPACE TEMPLATES E2E START - 'Should create Remix default workspace with files #flaky #group1': function (browser: NightwatchBrowser) { + 'Should create Remix default workspace with files #group1': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('filePanel') .click('*[data-id="workspaceCreate"]') @@ -378,8 +378,9 @@ module.exports = { // WORKSPACE TEMPLATES E2E END - 'Should create two workspace and switch to the first one #group1': function (browser: NightwatchBrowser) { + 'Should create two workspace and switch to the first one #flaky #group2': function (browser: NightwatchBrowser) { browser + .clickLaunchIcon('filePanel') .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') @@ -387,26 +388,26 @@ module.exports = { .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') - .pause(1000) .addFile('test.sol', { content: 'test' }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]') + .waitForElementPresent({ + selector: "//div[contains(@class, 'view-line') and contains(.//span, 'test')]", + locateStrategy: 'xpath' + }) .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name_1') .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .pause(2000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') - .pause(2000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') - .pause(2000) .switchWorkspace('workspace_name') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .currentWorkspaceIs('workspace_name') }, - 'Should rename a workspace #group1': function (browser: NightwatchBrowser) { + 'Should rename a workspace #group2': function (browser: NightwatchBrowser) { browser .useXpath() .waitForElementPresent({