Merge branch 'master' into parserfix

pull/2908/head
bunsenstraat 2 years ago committed by GitHub
commit f7ae3b6603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      .circleci/config.yml
  2. 19
      apps/remix-ide-e2e/src/commands/debugTransaction.ts
  3. 17
      apps/remix-ide-e2e/src/tests/solidityImport.test.ts

@ -90,12 +90,6 @@ jobs:
firefox --version firefox --version
geckodriver --version geckodriver --version
chromedriver --version chromedriver --version
java -jar /usr/local/bin/selenium.jar --version
- run:
name: Check out previous test metadata
command: |
cat "${CIRCLE_INTERNAL_TASK_DATA}/circle-test-results/results.json" | jq .
ls -la "${CIRCLE_INTERNAL_TASK_DATA}/"
- checkout - checkout
- attach_workspace: - attach_workspace:
at: . at: .
@ -107,9 +101,10 @@ jobs:
- run: yarn - run: yarn
- run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist - run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist
- run: ls -la ./dist/apps/remix-ide/assets/js - run: ls -la ./dist/apps/remix-ide/assets/js
- run: yarn run selenium-install
- run: - run:
name: Start Selenium name: Start Selenium
command: java -jar /usr/local/bin/selenium.jar command: yarn run selenium
background: true background: true
- run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.jobsize >> << parameters.job >> - run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.jobsize >> << parameters.job >>
- store_test_results: - store_test_results:
@ -141,7 +136,6 @@ jobs:
firefox --version firefox --version
geckodriver --version geckodriver --version
chromedriver --version chromedriver --version
java -jar /usr/local/bin/selenium.jar --version
name: Check install name: Check install
- checkout - checkout
- attach_workspace: - attach_workspace:
@ -153,9 +147,10 @@ jobs:
- run: yarn - run: yarn
- run: unzip ./persist/dist.zip - run: unzip ./persist/dist.zip
- run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist - run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist
- run: yarn run selenium-install
- run: - run:
name: Start Selenium name: Start Selenium
command: java -jar /usr/local/bin/selenium.jar command: yarn run selenium
background: true background: true
- run: ./apps/remix-ide/ci/<< parameters.script >> - run: ./apps/remix-ide/ci/<< parameters.script >>
- store_test_results: - store_test_results:

@ -2,7 +2,7 @@ import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events' import EventEmitter from 'events'
class debugTransaction extends EventEmitter { class debugTransaction extends EventEmitter {
command (this: NightwatchBrowser, index = 0): NightwatchBrowser { command(this: NightwatchBrowser, index = 0): NightwatchBrowser {
this.api.perform((done) => { this.api.perform((done) => {
checkStyle(this.api, index, () => { checkStyle(this.api, index, () => {
done() done()
@ -13,14 +13,27 @@ class debugTransaction extends EventEmitter {
} }
} }
function checkStyle (browser: NightwatchBrowser, index: number, callback: VoidFunction) { function checkStyle(browser: NightwatchBrowser, index: number, callback: VoidFunction) {
browser.pause(5000).execute(function (index: number) { let elementsFound = 0
browser.waitUntil(() => {
browser.findElements({
selector: '*[data-shared="txLoggerDebugButton"]',
timeout: 60000,
}, (result) => {
if (Array.isArray(result.value) && result.value.length > 0) {
elementsFound = result.value.length
}
})
return elementsFound > index
}, 60000)
.execute(function (index: number) {
const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement
debugBtn && debugBtn.click() debugBtn && debugBtn.click()
}, [index], function () { }, [index], function () {
browser.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]', 60000).perform(() => callback()) browser.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]', 60000).perform(() => callback())
}) })
} }
module.exports = debugTransaction module.exports = debugTransaction

@ -104,10 +104,27 @@ module.exports = {
'Test NPM Import (with unpkg.com) #group3': function (browser: NightwatchBrowser) { 'Test NPM Import (with unpkg.com) #group3': function (browser: NightwatchBrowser) {
browser browser
.setSolidityCompilerVersion('soljson-v0.8.7+commit.e28d00a7.js') .setSolidityCompilerVersion('soljson-v0.8.7+commit.e28d00a7.js')
.waitForElementPresent({
selector: `//*[@data-id='compilerloaded' and @data-version='soljson-v0.8.7+commit.e28d00a7.js']`,
locateStrategy: 'xpath',
timeout: 120000
})
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"') .click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('Untitled9.sol', sources[8]['Untitled9.sol']) .addFile('Untitled9.sol', sources[8]['Untitled9.sol'])
// avoid invalid source issues
.isVisible({
selector: '*[data-id="treeViewLitreeViewItem.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"]',
timeout: 120000,
suppressNotFoundErrors: true
})
.clickLaunchIcon('solidity')
.click('[data-id="compilerContainerCompileBtn"]')
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.isVisible({
selector: '*[data-id="treeViewLitreeViewItem.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"]',
timeout: 120000,
})
.verifyContracts(['test13', 'ERC20'], { wait: 30000 }) .verifyContracts(['test13', 'ERC20'], { wait: 30000 })
.end() .end()
} }

Loading…
Cancel
Save