Skip to content

Commit 13ebae2

Browse files
ioedeveloperyann300
authored andcommitted
Use default ID for firefox frames
1 parent 9b05b74 commit 13ebae2

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
import { NightwatchBrowser } from 'nightwatch'
33
import init from '../helpers/init'
44

5-
const getFrameId = function (browser: NightwatchBrowser) {
6-
return browser.options.desiredCapabilities.browserName === 'chrome' ? 0 : 1
7-
}
8-
95
module.exports = {
106
'@disabled': true,
117
before: function (browser: NightwatchBrowser, done: VoidFunction) {
@@ -48,7 +44,7 @@ module.exports = {
4844
'Should compute a witness for a simple circuit #group1': function (browser: NightwatchBrowser) {
4945
browser
5046
.clickLaunchIcon('circuit-compiler')
51-
.frame(getFrameId(browser))
47+
.frame(0)
5248
.waitForElementVisible('[data-id="witness_toggler"]')
5349
.click('[data-id="witness_toggler"]')
5450
.waitForElementVisible('[data-id="compute_witness_btn"]')
@@ -68,7 +64,7 @@ module.exports = {
6864
.waitForElementPresent('[data-path="Semaphore - 1/circuits/simple.circom"]')
6965
.waitForElementVisible('[data-path="Semaphore - 1/circuits/simple.circom"]')
7066
.clickLaunchIcon('circuit-compiler')
71-
.frame(getFrameId(browser))
67+
.frame(0)
7268
.waitForElementPresent('button[data-id="compile_circuit_btn"]')
7369
.waitForElementVisible('button[data-id="compile_circuit_btn"]')
7470
.click('button[data-id="compile_circuit_btn"]')
@@ -80,7 +76,7 @@ module.exports = {
8076
'Should run Groth16 setup and export for a simple circuit using the GUI #group2': function (browser: NightwatchBrowser) {
8177
browser
8278
.clickLaunchIcon('circuit-compiler')
83-
.frame(getFrameId(browser))
79+
.frame(0)
8480
.waitForElementVisible('[data-id="setup_exports_toggler"]')
8581
.waitForElementPresent('[data-id="groth16ProvingScheme"]')
8682
.click('[data-id="groth16ProvingScheme"]')
@@ -97,7 +93,7 @@ module.exports = {
9793
'Should run Plonk setup and export for a simple circuit using the GUI #group2': function (browser: NightwatchBrowser) {
9894
browser
9995
.clickLaunchIcon('circuit-compiler')
100-
.frame(getFrameId(browser))
96+
.frame(0)
10197
.waitForElementVisible('[data-id="setup_exports_toggler"]')
10298
.click('[data-id="setup_exports_toggler"]')
10399
.waitForElementPresent('[data-id="plonkProvingScheme"]')
@@ -130,7 +126,7 @@ module.exports = {
130126
.waitForElementVisible('[data-path="Semaphore - 1/circuits/simple.circom"]')
131127
.setEditorValue(warningCircuit)
132128
.clickLaunchIcon('circuit-compiler')
133-
.frame(getFrameId(browser))
129+
.frame(0)
134130
.waitForElementPresent('button[data-id="compile_circuit_btn"]')
135131
.waitForElementVisible('button[data-id="compile_circuit_btn"]')
136132
.click('button[data-id="compile_circuit_btn"]')
@@ -151,7 +147,7 @@ module.exports = {
151147
browser
152148
.frameParent()
153149
.setEditorValue(errorCircuit)
154-
.frame(getFrameId(browser))
150+
.frame(0)
155151
.waitForElementPresent('button[data-id="compile_circuit_btn"]')
156152
.waitForElementVisible('button[data-id="compile_circuit_btn"]')
157153
.click('button[data-id="compile_circuit_btn"]')
@@ -164,7 +160,7 @@ module.exports = {
164160
.click('[data-id="auto_compile_circuit_checkbox_input"]')
165161
.frameParent()
166162
.setEditorValue(validCircuit)
167-
.frame(getFrameId(browser))
163+
.frame(0)
168164
.waitForElementNotPresent('[data-id="circuit_feedback"]')
169165
.frameParent()
170166
.clickLaunchIcon('filePanel')

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ declare global {
66
interface Window { testplugin: { name: string, url: string }; }
77
}
88

9-
const getFrameId = function (browser: NightwatchBrowser) {
10-
return browser.options.desiredCapabilities.browserName === 'chrome' ? 0 : 1
11-
}
12-
139
const tests = {
1410
'@disabled': true,
1511
before: function (browser: NightwatchBrowser, done: VoidFunction) {
@@ -22,7 +18,7 @@ const tests = {
2218
.scrollAndClick('[data-id="pluginManagerComponentActivateButtoncontract-verification"]')
2319
.clickLaunchIcon('contract-verification')
2420
.pause(5000)
25-
.frame(getFrameId(browser))
21+
.frame(0)
2622
.waitForElementVisible('*[data-id="VerifyDescription"]')
2723
},
2824

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ declare global {
77
interface Window { testplugin: { name: string, url: string }; }
88
}
99

10-
const getFrameId = function (browser: NightwatchBrowser) {
11-
return browser.options.desiredCapabilities.browserName === 'chrome' ? 0 : 1
12-
}
13-
1410
module.exports = {
1511
'@disabled': true,
1612
before: function (browser: NightwatchBrowser, done: VoidFunction) {
@@ -21,7 +17,7 @@ module.exports = {
2117
browser.clickLaunchIcon('pluginManager')
2218
.scrollAndClick('[data-id="pluginManagerComponentActivateButtonvyper"]')
2319
.clickLaunchIcon('vyper')
24-
.frame(getFrameId(browser))
20+
.frame(0)
2521
},
2622

2723
'Should clone the Vyper repo #group1': function (browser: NightwatchBrowser) {
@@ -73,7 +69,7 @@ module.exports = {
7369
browser
7470
// @ts-ignore
7571
.clickLaunchIcon('vyper')
76-
.frame(getFrameId(browser))
72+
.frame(0)
7773
.click('[data-id="compile"]')
7874
.waitForElementVisible({
7975
selector:'[data-id="compilation-details"]',
@@ -94,7 +90,7 @@ module.exports = {
9490
chromeBrowser.setPermission('clipboard-read', 'granted')
9591
chromeBrowser.setPermission('clipboard-write', 'granted')
9692
browser
97-
.frame(getFrameId(browser))
93+
.frame(0)
9894
.click('[data-id="compile"]')
9995
.waitForElementVisible({
10096
selector:'[data-id="compilation-details"]',
@@ -126,7 +122,7 @@ module.exports = {
126122
.addFile('test_error.vy', { content: wrongContract })
127123
.clickLaunchIcon('vyper')
128124
// @ts-ignore
129-
.frame(getFrameId(browser))
125+
.frame(0)
130126
.waitForElementVisible('[data-id="compile"]')
131127
.click('[data-id="compile"]')
132128
.waitForElementVisible({
@@ -146,7 +142,7 @@ module.exports = {
146142
.addFile('test.vy', { content: testContract })
147143
.clickLaunchIcon('vyper')
148144
// @ts-ignore
149-
.frame(getFrameId(browser))
145+
.frame(0)
150146
.waitForElementVisible('[data-id="compile"]')
151147
.click('[data-id="compile"]')
152148
.waitForElementVisible({

0 commit comments

Comments
 (0)