2
2
import { NightwatchBrowser } from 'nightwatch'
3
3
import init from '../helpers/init'
4
4
5
- const getFrameId = function ( browser : NightwatchBrowser ) {
6
- return browser . options . desiredCapabilities . browserName === 'chrome' ? 0 : 1
7
- }
8
-
9
5
module . exports = {
10
6
'@disabled' : true ,
11
7
before : function ( browser : NightwatchBrowser , done : VoidFunction ) {
@@ -48,7 +44,7 @@ module.exports = {
48
44
'Should compute a witness for a simple circuit #group1' : function ( browser : NightwatchBrowser ) {
49
45
browser
50
46
. clickLaunchIcon ( 'circuit-compiler' )
51
- . frame ( getFrameId ( browser ) )
47
+ . frame ( 0 )
52
48
. waitForElementVisible ( '[data-id="witness_toggler"]' )
53
49
. click ( '[data-id="witness_toggler"]' )
54
50
. waitForElementVisible ( '[data-id="compute_witness_btn"]' )
@@ -68,7 +64,7 @@ module.exports = {
68
64
. waitForElementPresent ( '[data-path="Semaphore - 1/circuits/simple.circom"]' )
69
65
. waitForElementVisible ( '[data-path="Semaphore - 1/circuits/simple.circom"]' )
70
66
. clickLaunchIcon ( 'circuit-compiler' )
71
- . frame ( getFrameId ( browser ) )
67
+ . frame ( 0 )
72
68
. waitForElementPresent ( 'button[data-id="compile_circuit_btn"]' )
73
69
. waitForElementVisible ( 'button[data-id="compile_circuit_btn"]' )
74
70
. click ( 'button[data-id="compile_circuit_btn"]' )
@@ -80,7 +76,7 @@ module.exports = {
80
76
'Should run Groth16 setup and export for a simple circuit using the GUI #group2' : function ( browser : NightwatchBrowser ) {
81
77
browser
82
78
. clickLaunchIcon ( 'circuit-compiler' )
83
- . frame ( getFrameId ( browser ) )
79
+ . frame ( 0 )
84
80
. waitForElementVisible ( '[data-id="setup_exports_toggler"]' )
85
81
. waitForElementPresent ( '[data-id="groth16ProvingScheme"]' )
86
82
. click ( '[data-id="groth16ProvingScheme"]' )
@@ -97,7 +93,7 @@ module.exports = {
97
93
'Should run Plonk setup and export for a simple circuit using the GUI #group2' : function ( browser : NightwatchBrowser ) {
98
94
browser
99
95
. clickLaunchIcon ( 'circuit-compiler' )
100
- . frame ( getFrameId ( browser ) )
96
+ . frame ( 0 )
101
97
. waitForElementVisible ( '[data-id="setup_exports_toggler"]' )
102
98
. click ( '[data-id="setup_exports_toggler"]' )
103
99
. waitForElementPresent ( '[data-id="plonkProvingScheme"]' )
@@ -130,7 +126,7 @@ module.exports = {
130
126
. waitForElementVisible ( '[data-path="Semaphore - 1/circuits/simple.circom"]' )
131
127
. setEditorValue ( warningCircuit )
132
128
. clickLaunchIcon ( 'circuit-compiler' )
133
- . frame ( getFrameId ( browser ) )
129
+ . frame ( 0 )
134
130
. waitForElementPresent ( 'button[data-id="compile_circuit_btn"]' )
135
131
. waitForElementVisible ( 'button[data-id="compile_circuit_btn"]' )
136
132
. click ( 'button[data-id="compile_circuit_btn"]' )
@@ -151,7 +147,7 @@ module.exports = {
151
147
browser
152
148
. frameParent ( )
153
149
. setEditorValue ( errorCircuit )
154
- . frame ( getFrameId ( browser ) )
150
+ . frame ( 0 )
155
151
. waitForElementPresent ( 'button[data-id="compile_circuit_btn"]' )
156
152
. waitForElementVisible ( 'button[data-id="compile_circuit_btn"]' )
157
153
. click ( 'button[data-id="compile_circuit_btn"]' )
@@ -164,7 +160,7 @@ module.exports = {
164
160
. click ( '[data-id="auto_compile_circuit_checkbox_input"]' )
165
161
. frameParent ( )
166
162
. setEditorValue ( validCircuit )
167
- . frame ( getFrameId ( browser ) )
163
+ . frame ( 0 )
168
164
. waitForElementNotPresent ( '[data-id="circuit_feedback"]' )
169
165
. frameParent ( )
170
166
. clickLaunchIcon ( 'filePanel' )
0 commit comments