Merge pull request #4933 from ethereum/runtestsonmasteronly

run tests on master
pull/4926/head
Aniket 7 months ago committed by GitHub
commit a343b78c81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      apps/remix-ide-e2e/src/tests/etherscan_api.test.ts
  2. 9
      apps/remix-ide-e2e/src/tests/runAndDeploy_injected.test.ts
  3. 9
      apps/remix-ide-e2e/src/tests/terminal.test.ts

@ -6,7 +6,7 @@ declare global {
interface Window { testplugin: { name: string, url: string }; } interface Window { testplugin: { name: string, url: string }; }
} }
module.exports = { const tests = {
'@disabled': true, '@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done, null) init(browser, done, null)
@ -58,6 +58,14 @@ module.exports = {
} }
} }
const branch = process.env.CIRCLE_BRANCH;
const isMasterBranch = branch === 'master';
module.exports = {
...(branch ? (isMasterBranch ? tests : {}) : tests),
};
const verifiedContract = ` const verifiedContract = `
// SPDX-License-Identifier: GPL-3.0 // SPDX-License-Identifier: GPL-3.0

@ -25,7 +25,7 @@ const checkAlerts = function (browser: NightwatchBrowser){
}) })
} }
module.exports = { const tests = {
'@disabled': true, '@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done) init(browser, done)
@ -232,6 +232,13 @@ module.exports = {
} }
} }
const branch = process.env.CIRCLE_BRANCH;
const isMasterBranch = branch === 'master';
module.exports = {
...(branch ? (isMasterBranch ? tests : {}) : tests),
};
const localsCheck = { const localsCheck = {
to: { to: {
value: '0x4B0897B0513FDC7C541B6D9D7E929C4E5364D2DB', value: '0x4B0897B0513FDC7C541B6D9D7E929C4E5364D2DB',

@ -2,6 +2,10 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
const branch = process.env.CIRCLE_BRANCH;
const isMasterBranch = branch === 'master';
const runMasterTests: boolean = (branch ? (isMasterBranch ? true : false) : true)
module.exports = { module.exports = {
'@disabled': true, '@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -209,6 +213,7 @@ module.exports = {
}, },
'Should run a script which log transaction and block using web3.js and ethers #group7': function (browser: NightwatchBrowser) { 'Should run a script which log transaction and block using web3.js and ethers #group7': function (browser: NightwatchBrowser) {
if (runMasterTests)
browser browser
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.switchEnvironment('basic-http-provider') .switchEnvironment('basic-http-provider')
@ -291,6 +296,7 @@ module.exports = {
}, },
'Should connect to mainnet fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) { 'Should connect to mainnet fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) {
if (runMasterTests)
browser browser
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork') .switchEnvironment('vm-mainnet-fork')
@ -305,6 +311,7 @@ module.exports = {
}, },
'Should connect to the sepolia fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) { 'Should connect to the sepolia fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) {
if (runMasterTests)
browser browser
.switchEnvironment('vm-custom-fork') .switchEnvironment('vm-custom-fork')
.waitForElementVisible('[data-id="vm-custom-fork-modal-footer-ok-react"]') .waitForElementVisible('[data-id="vm-custom-fork-modal-footer-ok-react"]')
@ -354,6 +361,7 @@ module.exports = {
console.log(resolver.addr(node)); console.log(resolver.addr(node));
} }
` `
if (runMasterTests) {
browser browser
// .clickLaunchIcon('udapp') // .clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork') .switchEnvironment('vm-mainnet-fork')
@ -377,6 +385,7 @@ module.exports = {
}) })
.useCss() .useCss()
.waitForElementContainsText('*[data-id="terminalJournal"]', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 120000) .waitForElementContainsText('*[data-id="terminalJournal"]', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 120000)
}
}, },
'Should run free function which logs in the terminal #group10': function (browser: NightwatchBrowser) { 'Should run free function which logs in the terminal #group10': function (browser: NightwatchBrowser) {

Loading…
Cancel
Save