diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 6a0dedd582..c145a2934b 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -527,7 +527,7 @@ async function installFoundry(): Promise { server.stdout.on('data', function (data) { console.log(data.toString()) if ( - data.toString().includes("foundryup: use - chisel 0.3.0") + data.toString().includes("foundryup: use - chisel 1.0.0-stable") ) { console.log('resolving') resolve() diff --git a/apps/remixdesktop/test/tests/app/foundry.test.ts b/apps/remixdesktop/test/tests/app/foundry.test.ts index f4d2615f93..a1d733d09e 100644 --- a/apps/remixdesktop/test/tests/app/foundry.test.ts +++ b/apps/remixdesktop/test/tests/app/foundry.test.ts @@ -89,7 +89,7 @@ async function installFoundry(): Promise { server.stdout.on('data', function (data) { console.log(data.toString()) if ( - data.toString().includes("foundryup: use - chisel 0.3.0") + data.toString().includes("foundryup: use - chisel 1.0.0-stable") ) { console.log('resolving') resolve() diff --git a/apps/remixdesktop/test/tests/app/github_3.test.ts b/apps/remixdesktop/test/tests/app/github_3.test.ts index 12542bb86f..f2c8f1132b 100644 --- a/apps/remixdesktop/test/tests/app/github_3.test.ts +++ b/apps/remixdesktop/test/tests/app/github_3.test.ts @@ -131,7 +131,7 @@ const tests = { .elements('xpath', '//*[@data-id="commits-current-branch-master"]//*[@data-type="commit-summary"]', function (result) { console.log('Number of commit-summary elements:', (result.value as any).length); browser.assert.ok((result.value as any).length > commitCount) - }) + }).pause(10000) }, 'load more branches from remote #group3': function (browser: NightwatchBrowser) { @@ -155,15 +155,34 @@ const tests = { if (useIsoGit) { - browser.waitForElementVisible('*[data-id="remote-sync-origin"]') + const branchSelector = '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-type="branches-branch"]'; + + browser + .waitForElementVisible('*[data-id="remote-sync-origin"]') .click('*[data-id="remote-sync-origin"]') .waitForElementVisible('*[data-id="loader-indicator"]') - .waitForElementNotPresent('*[data-id="loader-indicator"]') - .pause(2000) - .elements('xpath', '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-type="branches-branch"]', function (result) { - console.log('Number of branches elements:', (result.value as any).length); - browser.assert.ok((result.value as any).length > branchCount) - }) + + browser.perform(function (done) { + function checkElements() { + browser.execute( + function (xpath) { + return document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotLength; + }, + [branchSelector], + function (result) { + if ((result.value as number) > 1) { + console.log('Number of loaded branches elements:', result.value); + done(); + } else { + browser.pause(1000); // Wait and check again + checkElements(); + } + } + ); + } + + checkElements(); + }); } else { browser.waitForElementVisible('*[data-id="show-more-branches-on-remote"]') .click('*[data-id="show-more-branches-on-remote"]')