currentWorkspaceIs

li[data-id="treeViewLitreeViewItemexamples"]

filePanel

timeout

fallback

isVisible

isVisible

console

retry

retry

turn off flaky

add more checks

add more checks

flaky
pull/3600/head
filip mertens 2 years ago
parent ef09fd00be
commit cbcaac24c6
  1. 2
      .circleci/config.yml
  2. 41
      apps/remix-ide-e2e/src/tests/vyper_api.test.ts

@ -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:

@ -21,12 +21,18 @@ 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()
.saveScreenshot('./reports/screenshots/vyper_api_test_should_clone_the_vyper_repo.png')
.clickLaunchIcon('filePanel')
.waitForElementVisible({
selector: "//*[@data-id='workspacesSelect' and contains(.,'vyper-lang')]",
locateStrategy: 'xpath',
timeout: 60000
})
.currentWorkspaceIs('vyper-lang')
.waitForElementVisible({
selector:"//*[@data-id='workspacesSelect' and contains(.,'vyper-lang')]",
selector: "//*[@data-id='treeViewLitreeViewItemexamples' and contains(.,'examples')]",
locateStrategy: 'xpath',
timeout: 60000
})
@ -41,7 +47,21 @@ module.exports = {
.frame(0)
.click('[data-id="remote-compiler"]')
.click('[data-id="compile"]')
.waitForElementVisible('[data-id="copy-abi"]')
.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')
}
})
},
'Compile test contract and deploy to remix VM #group1': function (browser: NightwatchBrowser) {
@ -55,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('')

Loading…
Cancel
Save