From 3a0a0afbef242d8a6f1d82fbc56ae75d1ee06f03 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 11:53:29 +0200 Subject: [PATCH 01/14] currentWorkspaceIs --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 70842027d2..b992ef0bf3 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -30,6 +30,7 @@ module.exports = { locateStrategy: 'xpath', timeout: 60000 }) + .currentWorkspaceIs('vyper-lang') .openFile('examples') .openFile('examples/auctions') .openFile('examples/auctions/blind_auction.vy') From 4d0cea36467d8e6ea1ef47875d8c3799172cfc18 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 11:54:52 +0200 Subject: [PATCH 02/14] li[data-id="treeViewLitreeViewItemexamples"] --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index b992ef0bf3..06d866f48e 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -31,6 +31,7 @@ module.exports = { timeout: 60000 }) .currentWorkspaceIs('vyper-lang') + .waitForElementVisible('li[data-id="treeViewLitreeViewItemexamples"]') .openFile('examples') .openFile('examples/auctions') .openFile('examples/auctions/blind_auction.vy') From 220108f47aab8a6c71f64306bbe0f4d9c4b18475 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:00:09 +0200 Subject: [PATCH 03/14] filePanel --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 06d866f48e..5f130a3731 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -24,6 +24,7 @@ module.exports = { 'Should clone the Vyper repo #group1 #flaky': function (browser: NightwatchBrowser) { browser.click('button[data-id="add-repository"]') .frameParent() + .clickLaunchIcon('filePanel') .saveScreenshot('./reports/screenshots/vyper_api_test_should_clone_the_vyper_repo.png') .waitForElementVisible({ selector:"//*[@data-id='workspacesSelect' and contains(.,'vyper-lang')]", From 087c8753848366816fd4c425ea2914f5d9e93dcd Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:05:52 +0200 Subject: [PATCH 04/14] timeout --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 5f130a3731..42a7fc7f5f 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -32,7 +32,11 @@ module.exports = { timeout: 60000 }) .currentWorkspaceIs('vyper-lang') - .waitForElementVisible('li[data-id="treeViewLitreeViewItemexamples"]') + .waitForElementVisible({ + selector:"//*[@data-id='treeViewLitreeViewItemexamples' and contains(.,'examples')]", + locateStrategy: 'xpath', + timeout: 60000 + }) .openFile('examples') .openFile('examples/auctions') .openFile('examples/auctions/blind_auction.vy') From d39bcfc5fa060fc30b4814febfe1c83f1119478a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:22:10 +0200 Subject: [PATCH 05/14] fallback --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 42a7fc7f5f..bbfd5fe107 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -27,13 +27,13 @@ module.exports = { .clickLaunchIcon('filePanel') .saveScreenshot('./reports/screenshots/vyper_api_test_should_clone_the_vyper_repo.png') .waitForElementVisible({ - selector:"//*[@data-id='workspacesSelect' and contains(.,'vyper-lang')]", + selector: "//*[@data-id='workspacesSelect' and contains(.,'vyper-lang')]", locateStrategy: 'xpath', timeout: 60000 }) .currentWorkspaceIs('vyper-lang') .waitForElementVisible({ - selector:"//*[@data-id='treeViewLitreeViewItemexamples' and contains(.,'examples')]", + selector: "//*[@data-id='treeViewLitreeViewItemexamples' and contains(.,'examples')]", locateStrategy: 'xpath', timeout: 60000 }) @@ -48,7 +48,18 @@ module.exports = { .frame(0) .click('[data-id="remote-compiler"]') .click('[data-id="compile"]') + .waitForElementVisible({ + selector: '[data-id="copy-abi"]', + timeout: 4000, + abortOnFailure: false, + suppressNotFoundErrors: true + }).isVisible('[data-id="copy-abi"]', (okVisible) => { + if (!okVisible) { + browser.click('[data-id="compile"]') + } + }) .waitForElementVisible('[data-id="copy-abi"]') + }, 'Compile test contract and deploy to remix VM #group1': function (browser: NightwatchBrowser) { From f884b1abb9183b0605b773cbfe316d5d9629832d Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:29:40 +0200 Subject: [PATCH 06/14] isVisible --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index bbfd5fe107..4625bc74ae 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -48,7 +48,7 @@ module.exports = { .frame(0) .click('[data-id="remote-compiler"]') .click('[data-id="compile"]') - .waitForElementVisible({ + .isVisible({ selector: '[data-id="copy-abi"]', timeout: 4000, abortOnFailure: false, From 1ea8630f209044a8b27a7d7eee97244190ae628d Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:30:58 +0200 Subject: [PATCH 07/14] isVisible --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 4625bc74ae..bc12459284 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -53,7 +53,7 @@ module.exports = { timeout: 4000, abortOnFailure: false, suppressNotFoundErrors: true - }).isVisible('[data-id="copy-abi"]', (okVisible) => { + }, (okVisible) => { if (!okVisible) { browser.click('[data-id="compile"]') } From 7820e553d8eb2ee74b59de2ee074a843319397f9 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:37:13 +0200 Subject: [PATCH 08/14] console --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index bc12459284..fd35ea19df 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -54,7 +54,9 @@ module.exports = { abortOnFailure: false, suppressNotFoundErrors: true }, (okVisible) => { + console.log('okVisible', okVisible) if (!okVisible) { + console.log('retrying') browser.click('[data-id="compile"]') } }) From 9bf46c4bcd2db35498119b4b376f10fb891f9e00 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 12:46:05 +0200 Subject: [PATCH 09/14] retry --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index fd35ea19df..1be327858c 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -55,7 +55,7 @@ module.exports = { suppressNotFoundErrors: true }, (okVisible) => { console.log('okVisible', okVisible) - if (!okVisible) { + if (!okVisible.status) { console.log('retrying') browser.click('[data-id="compile"]') } From b61b6c88dca038ec599a0f091d6f0a676bcb2598 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 13:02:08 +0200 Subject: [PATCH 10/14] retry --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 1be327858c..2d83ff3bb7 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -54,13 +54,14 @@ module.exports = { abortOnFailure: false, suppressNotFoundErrors: true }, (okVisible) => { - console.log('okVisible', okVisible) - if (!okVisible.status) { - console.log('retrying') - browser.click('[data-id="compile"]') + if (okVisible.value === null) { + console.log('retrying compilation...') + browser.click('[data-id="compile"]').waitForElementVisible('[data-id="copy-abi"]') + } else{ + browser.assert.ok(okVisible.value === true, 'ABI should be visible') } }) - .waitForElementVisible('[data-id="copy-abi"]') + }, From 4def3af218d53751ebccec4b9e97f2ca8f14a63d Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 13:13:39 +0200 Subject: [PATCH 11/14] turn off flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6afeb12361..7df04afe44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.4.1 jobs: diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 2d83ff3bb7..68f29dbc2c 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -21,11 +21,10 @@ module.exports = { .frame(0) }, - 'Should clone the Vyper repo #group1 #flaky': function (browser: NightwatchBrowser) { + 'Should clone the Vyper repo #group1': function (browser: NightwatchBrowser) { browser.click('button[data-id="add-repository"]') .frameParent() .clickLaunchIcon('filePanel') - .saveScreenshot('./reports/screenshots/vyper_api_test_should_clone_the_vyper_repo.png') .waitForElementVisible({ selector: "//*[@data-id='workspacesSelect' and contains(.,'vyper-lang')]", locateStrategy: 'xpath', From 432b5c3cec49a8c565000b355a6743152f3479cc Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 13:16:21 +0200 Subject: [PATCH 12/14] add more checks --- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 68f29dbc2c..817b65cd14 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -75,6 +75,19 @@ module.exports = { // @ts-ignore .frame(0) .click('[data-id="compile"]') + .isVisible({ + selector: '[data-id="copy-abi"]', + timeout: 4000, + abortOnFailure: false, + suppressNotFoundErrors: true + }, (okVisible) => { + if (okVisible.value === null) { + console.log('retrying compilation...') + browser.click('[data-id="compile"]').waitForElementVisible('[data-id="copy-abi"]') + } else{ + browser.assert.ok(okVisible.value === true, 'ABI should be visible') + } + }) .frameParent() .clickLaunchIcon('udapp') .createContract('') From 1e35f8634db32a8d31688f5df95d32a2d6dbafd8 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 13:18:17 +0200 Subject: [PATCH 13/14] add more checks --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7df04afe44..6afeb12361 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.4.1 jobs: diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 817b65cd14..5c9ffeca64 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -21,7 +21,7 @@ module.exports = { .frame(0) }, - 'Should clone the Vyper repo #group1': function (browser: NightwatchBrowser) { + 'Should clone the Vyper repo #flaky #group1': function (browser: NightwatchBrowser) { browser.click('button[data-id="add-repository"]') .frameParent() .clickLaunchIcon('filePanel') From bfc26f3e936a1ce04e2b873f41c641bf5d55da98 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 5 Apr 2023 13:23:11 +0200 Subject: [PATCH 14/14] flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/vyper_api.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6afeb12361..7df04afe44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.4.1 jobs: diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts index 5c9ffeca64..817b65cd14 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.test.ts @@ -21,7 +21,7 @@ module.exports = { .frame(0) }, - 'Should clone the Vyper repo #flaky #group1': function (browser: NightwatchBrowser) { + 'Should clone the Vyper repo #group1': function (browser: NightwatchBrowser) { browser.click('button[data-id="add-repository"]') .frameParent() .clickLaunchIcon('filePanel')