Skip to content

Commit 85c42e7

Browse files
STetsingci-bot
authored andcommitted
enabled AI test on master, live deploy branches
1 parent 9e007de commit 85c42e7

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

apps/remix-ide-e2e/src/tests/ai_panel.test.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const sources = [
88
{ 'Untitled.sol': { content: examples.ballot.content } }
99
]
1010

11-
module.exports = {
11+
const tests = {
1212
'@disabled': true,
1313
before: function (browser: NightwatchBrowser, done: VoidFunction) {
1414
init(browser, done)
@@ -271,3 +271,18 @@ module.exports = {
271271
.waitForElementNotVisible('*[data-id="remix-ai-assistant"]', 5000)
272272
},
273273
}
274+
275+
const branch = process.env.CIRCLE_BRANCH
276+
const runTestsConditions = branch && (branch === 'master' || branch === 'remix_live' || branch.includes('remix_beta') || branch.includes('metamask'))
277+
278+
const checkBrowserIsChrome = function (browser: NightwatchBrowser) {
279+
return browser.browserName.indexOf('chrome') > -1
280+
}
281+
282+
if (!checkBrowserIsChrome(browser)) {
283+
module.exports = {}
284+
} else {
285+
module.exports = {
286+
...(branch ? (runTestsConditions ? tests : {}) : tests)
287+
};
288+
}

0 commit comments

Comments
 (0)