@@ -140,43 +140,45 @@ const tests = {
140
140
} )
141
141
. clickLaunchIcon ( 'filePanel' )
142
142
} ,
143
- 'Should show fork states provider in environment explorer & make txs using forked state #group1' : function ( browser : NightwatchBrowser ) {
143
+ 'Should show fork states provider in environment dropdown & make txs using forked state #group1' : function ( browser : NightwatchBrowser ) {
144
144
browser
145
145
. clickLaunchIcon ( 'udapp' )
146
146
. waitForElementVisible ( '[data-id="settingsSelectEnvOptions"]' )
147
147
. click ( '[data-id="settingsSelectEnvOptions"] button' )
148
- . waitForElementVisible ( `[data-id="dropdown-item-another-chain"]` )
149
- . click ( `[data-id="dropdown-item-another-chain"]` )
150
- . waitForElementVisible ( '[data-id="remixUIGSDeploy to an In-browser Forked State."]' )
151
- . waitForElementPresent ( '[data-id="remixUIGSforkedState_1"]' )
152
- . waitForElementPresent ( '[data-id="vm-fs-forkedState_1-pinned"]' )
153
- . waitForElementContainsText ( '[data-id="vm-fs-forkedState_1desc"]' , 'Latest Block: 2' )
154
- . waitForElementNotPresent ( '[data-id="remixUIGSforkedState_2"]' )
148
+ . useXpath ( )
149
+ . moveToElement ( "//span[contains(@class,'dropdown-item') and normalize-space()='Remix VM']" , 5 , 5 )
150
+ . useCss ( )
151
+ . waitForElementVisible ( `[data-id="dropdown-item-vm-fs-forkedState_1"]` )
152
+ . click ( '[data-id="settingsSelectEnvOptions"] button' )
155
153
. switchEnvironment ( 'vm-prague' )
156
154
. openFile ( 'contracts/1_Storage.sol' )
157
- . verifyContracts ( [ 'Storage' ] )
155
+ . clickLaunchIcon ( 'solidity' )
156
+ . click ( '*[data-id="compilerContainerCompileBtn"]' )
157
+ . pause ( 2000 )
158
158
. clickLaunchIcon ( 'udapp' )
159
+ . selectContract ( 'Storage' )
159
160
. click ( '*[data-id="Deploy - transact (not payable)"]' )
160
- . waitForElementVisible ( '*[data-id="unpinnedInstance0xf8e81D47203A594245E36C48e151709F0C19fBe8"]' )
161
+ . pause ( 5000 )
161
162
. click ( '*[data-id="fork-state-icon"]' )
162
163
. waitForElementVisible ( '*[data-id="udappNotifyModalDialogModalTitle-react"]' )
164
+ . pause ( 2000 )
163
165
. click ( 'input[data-id="modalDialogForkState"]' )
164
166
. setValue ( 'input[data-id="modalDialogForkState"]' , 'forkedState_2' )
165
167
. modalFooterOKClick ( 'udappNotify' )
166
168
. waitForElementVisible ( '*[data-shared="tooltipPopup"]' , 10000 )
167
169
. waitForElementContainsText ( '*[data-shared="tooltipPopup"]' , `New environment 'forkedState_2' created with forked state.` )
168
- // check if 'forkedState_2' is selected as current environment
169
- . waitForElementPresent ( '*[data-id="selected-provider-vm-fs-forkedState_2"]' )
170
- // check if 'forkedState_2' is present in environment explorer
171
- . waitForElementPresent ( '[data-id="remixUIGSforkedState_2"]' )
172
- // check if 'forkedState_2' is pinned in environment explorer
173
- . waitForElementPresent ( '[data-id="vm-fs-forkedState_2-pinned"]' )
174
- // 'forkedState_2' should have 3 blocks
175
- . waitForElementContainsText ( '[data-id="vm-fs-forkedState_2desc"]' , 'Latest Block: 3' )
170
+ . assert . elementPresent ( '*[data-id="selected-provider-vm-fs-forkedState_2"]' )
171
+
172
+ . click ( '[data-id="settingsSelectEnvOptions"] button' )
173
+ . useXpath ( )
174
+ . moveToElement ( "//span[contains(@class,'dropdown-item') and normalize-space()='Remix VM']" , 5 , 5 )
175
+ . useCss ( )
176
+ . waitForElementVisible ( `[data-id="dropdown-item-vm-fs-forkedState_2"]` )
177
+ . click ( '[data-id="settingsSelectEnvOptions"] button' )
178
+
176
179
. click ( '*[data-id="Deploy - transact (not payable)"]' )
177
180
. clickInstance ( 0 )
178
181
. clickFunction ( 'store - transact (not payable)' , { types : 'uint256 num' , values : '"555"' } )
179
- // block number should be 5 after 2 txs
180
182
. testFunction ( 'last' ,
181
183
{
182
184
status : '0x1 Transaction mined and execution succeed' ,
@@ -188,7 +190,9 @@ const tests = {
188
190
browser
189
191
. switchEnvironment ( 'vm-prague' )
190
192
. openFile ( 'contracts/1_Storage.sol' )
191
- . verifyContracts ( [ 'Storage' ] )
193
+ . clickLaunchIcon ( 'solidity' )
194
+ . click ( '*[data-id="compilerContainerCompileBtn"]' )
195
+ . pause ( 2000 )
192
196
. clickLaunchIcon ( 'udapp' )
193
197
. click ( '*[data-id="Deploy - transact (not payable)"]' )
194
198
. pause ( 10000 )
0 commit comments