From c8510d666c9fc32d63bb9b512bcde389da9054c9 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 11 Jun 2024 12:36:12 +0100 Subject: [PATCH] fix e2e --- .../tests/file_explorer_context_menu.test.ts | 44 +++++++++---------- apps/remix-ide-e2e/src/tests/terminal.test.ts | 1 + 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/file_explorer_context_menu.test.ts b/apps/remix-ide-e2e/src/tests/file_explorer_context_menu.test.ts index c655a576f6..91730b50f4 100644 --- a/apps/remix-ide-e2e/src/tests/file_explorer_context_menu.test.ts +++ b/apps/remix-ide-e2e/src/tests/file_explorer_context_menu.test.ts @@ -105,25 +105,25 @@ module.exports = { .click('*[data-id="contextMenuItempaste"]') .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/Copy_README.txt"]', 7000) }, - // folder copy paste tests - 'Should copy folder and paste in root with right click and it will contain a copied folder #group1 ': function (browser: NightwatchBrowser) { - browser - .rightClick('li[data-id="treeViewLitreeViewItemcontracts"]') - .waitForElementPresent('[data-id="contextMenuItemcopy') - .click('[data-id="contextMenuItemcopy"]') - .rightClick('*[data-id="treeViewLiMenu"]') - .click('*[data-id="contextMenuItempaste"]') - .waitForElementVisible('*[data-id="treeViewLitreeViewItemCopy_contracts"]', 7000) - }, - 'Should copy folder and paste in contracts with right click and it will contain a copied folder #group1 ': function (browser: NightwatchBrowser) { - browser - .pause(1000) - .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') - .rightClick('li[data-id="treeViewLitreeViewItemscripts"]') - .waitForElementPresent('[data-id="contextMenuItemcopy') - .click('[data-id="contextMenuItemcopy"]') - .rightClick('*[data-id="treeViewLitreeViewItemcontracts"]') - .click('*[data-id="contextMenuItempaste"]') - .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/Copy_scripts"]', 7000) - } -} \ No newline at end of file + // folder copy paste tests + 'Should copy folder and paste in root with right click and it will contain a copied folder #group1 ': function (browser: NightwatchBrowser) { + browser + .rightClick('li[data-id="treeViewLitreeViewItemcontracts"]') + .waitForElementPresent('[data-id="contextMenuItemcopy') + .click('[data-id="contextMenuItemcopy"]') + .rightClick('*[data-id="treeViewLiMenu"]') + .click('*[data-id="contextMenuItempaste"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemCopy_contracts"]', 7000) + }, + 'Should copy folder and paste in contracts with right click and it will contain a copied folder #group1 ': function (browser: NightwatchBrowser) { + browser + .pause(1000) + .waitForElementVisible('li[data-id="treeViewLitreeViewItemscripts"]') + .rightClick('li[data-id="treeViewLitreeViewItemscripts"]') + .waitForElementPresent('[data-id="contextMenuItemcopy') + .click('[data-id="contextMenuItemcopy"]') + .rightClick('*[data-id="treeViewLitreeViewItemcontracts"]') + .click('*[data-id="contextMenuItempaste"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/Copy_scripts"]', 7000) + } +} diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index fdbc8fb8b1..3b2663d3b1 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -117,6 +117,7 @@ module.exports = { .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) .clickInstance(0) .clickFunction('changeOwner - transact (not payable)', { types: 'address newOwner', values: '0xd9145CCE52D386f254917e481eB44e9943F39138' }) // execute the "changeOwner" function + .pause(3000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'previousOwner', 60000) // check that the script is logging the event .waitForElementContainsText('*[data-id="terminalJournal"]', '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4', 60000) // check that the script is logging the event .waitForElementContainsText('*[data-id="terminalJournal"]', 'newOwner', 60000)