@@ -42,7 +42,7 @@ const sources = [
42
42
]
43
43
44
44
module . exports = {
45
- '@disabled' : true ,
45
+ '@disabled' : false ,
46
46
before : function ( browser : NightwatchBrowser , done : VoidFunction ) {
47
47
init ( browser , done , 'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js' , true )
48
48
} ,
@@ -175,6 +175,37 @@ module.exports = {
175
175
} )
176
176
} ,
177
177
178
+ 'Should load the code from URL & code params with special character #group1' : function ( browser : NightwatchBrowser ) {
179
+ browser
180
+ . url ( 'http://127.0.0.1:8080/#code=Ly8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IE1JVAovLyBDb21wYXRpYmxlIHdpdGggT3BlblplcHBlbGluIENvbnRyYWN0cyBeNS4wLjAKcHJhZ21hIHNvbGlkaXR5IF4wLjguMjc7CgppbXBvcnQge0VSQzIwfSBmcm9tICJAb3BlbnplcHBlbGluL2NvbnRyYWN0c0A1LjMuMC90b2tlbi9FUkMyMC9FUkMyMC5zb2wiOwppbXBvcnQge0VSQzIwUGVybWl0fSBmcm9tICJAb3BlbnplcHBlbGluL2NvbnRyYWN0c0A1LjMuMC90b2tlbi9FUkMyMC9leHRlbnNpb25zL0VSQzIwUGVybWl0LnNvbCI7Cgpjb250cmFjdCBDTXlUb2tlbiBpcyBFUkMyMCwgRVJDMjBQZXJtaXQgewogICAgY29uc3RydWN0b3IoKQogICAgICAgIEVSQzIwKHVuaWNvZGUi4biJTXlUb2tlbvCfjLsiLCAiTVRLIikKICAgICAgICBFUkMyMFBlcm1pdCh1bmljb2RlIuG4iU15VG9rZW7wn4y7IikKICAgIHt9Cn0K&lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.30+commit.73712a01.js' )
181
+ . refreshPage ( ) // we do one reload for making sure we already have the default workspace
182
+
183
+ . waitForElementVisible ( '[data-id="compilerContainerCompileBtn"]' )
184
+ . clickLaunchIcon ( 'filePanel' )
185
+ . waitForElementVisible ( {
186
+ selector : `//li[@data-id="treeViewLitreeViewItemcontract-89b91e9381.sol"]` ,
187
+ locateStrategy : 'xpath'
188
+ } )
189
+ . currentWorkspaceIs ( 'code-sample' )
190
+ . waitForElementVisible ( {
191
+ selector : '//*[@id="editorView"]' ,
192
+ locateStrategy : 'xpath'
193
+ } )
194
+ . getEditorValue ( ( content ) => {
195
+ browser . assert . ok ( content && content . indexOf (
196
+ '"ḉMyToken🌻"' ) !== - 1 ,
197
+ 'code has been loaded' )
198
+ } )
199
+ . url ( 'http://127.0.0.1:8080' ) // refresh without loading the code sample
200
+ . pause ( 2000 )
201
+ . currentWorkspaceIs ( 'default_workspace' )
202
+ . execute ( ( ) => {
203
+ return document . querySelector ( '[data-id="dropdown-item-code-sample"]' ) === null
204
+ } , [ ] , ( result ) => {
205
+ browser . assert . ok ( ( result as any ) . value , 'sample template has not be persisted.' ) // code-sample should not be kept.
206
+ } )
207
+ } ,
208
+
178
209
'Should load the code from language & code params #group1' : function ( browser : NightwatchBrowser ) {
179
210
browser
180
211
@@ -234,26 +265,26 @@ module.exports = {
234
265
. expect . element ( '[data-id="contractGUIDeployWithProxy"]' ) . to . be . selected
235
266
} ,
236
267
237
- 'Should select upgrade with proxy option from URL params #group2' : function ( browser : NightwatchBrowser ) {
238
- browser
239
- . url ( 'http://127.0.0.1:8080/#optimize=false&runs=200&upgradeProxy=true' )
240
- . refreshPage ( )
241
- . waitForElementVisible ( '*[data-id="treeViewLitreeViewItemmyTokenV1.sol"]' , 60000 )
242
- . openFile ( 'myTokenV1.sol' )
243
- . waitForElementVisible ( {
244
- locateStrategy : 'xpath' ,
245
- selector : "//*[contains(@class, 'view-lines') and contains(.,'ERC721Upgradeable')]"
246
- } )
247
- . clickLaunchIcon ( 'solidity' )
248
- . waitForElementVisible ( '[data-id="compilerContainerCompileBtn"]' )
249
- . click ( '[data-id="compilerContainerCompileBtn"]' )
250
- . waitForElementPresent ( 'select[id="compiledContracts"] option[value=MyToken]' , 60000 )
251
- . clickLaunchIcon ( 'udapp' )
252
- . click ( 'select.udapp_contractNames' )
253
- . click ( 'select.udapp_contractNames option[value=MyToken]' )
254
- . waitForElementPresent ( '[data-id="contractGUIUpgradeImplementationLabel"]' )
255
- . expect . element ( '[data-id="contractGUIUpgradeImplementation"]' ) . to . be . selected
256
- } ,
268
+ // 'Should select upgrade with proxy option from URL params #group2': function (browser: NightwatchBrowser) {
269
+ // browser
270
+ // .url('http://127.0.0.1:8080/#optimize=false&runs=200&upgradeProxy=true')
271
+ // .refreshPage()
272
+ // .waitForElementVisible('*[data-id="treeViewLitreeViewItemmyTokenV1.sol"]', 60000)
273
+ // .openFile('myTokenV1.sol')
274
+ // .waitForElementVisible({
275
+ // locateStrategy: 'xpath',
276
+ // selector: "//*[contains(@class, 'view-lines') and contains(.,'ERC721Upgradeable')]"
277
+ // })
278
+ // .clickLaunchIcon('solidity')
279
+ // .waitForElementVisible('[data-id="compilerContainerCompileBtn"]')
280
+ // .click('[data-id="compilerContainerCompileBtn"]')
281
+ // .waitForElementPresent('select[id="compiledContracts"] option[value=MyToken]', 60000)
282
+ // .clickLaunchIcon('udapp')
283
+ // .click('select.udapp_contractNames')
284
+ // .click('select.udapp_contractNames option[value=MyToken]')
285
+ // .waitForElementPresent('[data-id="contractGUIUpgradeImplementationLabel"]')
286
+ // .expect.element('[data-id="contractGUIUpgradeImplementation"]').to.be.selected
287
+ // },
257
288
258
289
'Should load using various URL compiler params #group2' : function ( browser : NightwatchBrowser ) {
259
290
browser
@@ -322,15 +353,15 @@ module.exports = {
322
353
. openFile ( 'contracts/governance/UnionGovernor.sol' )
323
354
} ,
324
355
325
- 'Should execute function call from URL parameters #group3' : function ( browser : NightwatchBrowser ) {
326
- browser
327
- . switchWorkspace ( 'default_workspace' )
328
- . url ( 'http://127.0.0.1:8080?calls=fileManager//open//contracts/3_Ballot.sol///terminal//log//log' )
329
- . refreshPage ( )
330
- . waitForElementVisible ( '*[data-shared="tooltipPopup"]' )
331
- . waitForElementContainsText ( '*[data-shared="tooltipPopup"]' , 'initiating fileManager and calling "open" ...' )
332
- . waitForElementContainsText ( '*[data-shared="tooltipPopup"]' , 'initiating terminal and calling "log" ...' )
333
- } ,
356
+ // 'Should execute function call from URL parameters #group3': function (browser: NightwatchBrowser) {
357
+ // browser
358
+ // .switchWorkspace('default_workspace')
359
+ // .url('http://127.0.0.1:8080?calls=fileManager//open//contracts/3_Ballot.sol///terminal//log//log')
360
+ // .refreshPage()
361
+ // .waitForElementVisible('*[data-shared="tooltipPopup"]')
362
+ // .waitForElementContainsText('*[data-shared="tooltipPopup"]', 'initiating fileManager and calling "open" ...')
363
+ // .waitForElementContainsText('*[data-shared="tooltipPopup"]', 'initiating terminal and calling "log" ...')
364
+ // },
334
365
335
366
'Import Github folder from URL params #group4' : function ( browser : NightwatchBrowser ) {
336
367
browser
@@ -342,7 +373,7 @@ module.exports = {
342
373
. openFile ( 'contracts/Lock.sol' )
343
374
. getEditorValue ( ( content ) => {
344
375
browser . assert . ok ( content . indexOf ( 'contract Lock {' ) !== - 1 , 'content does contain "contract Lock {"' )
345
- } )
376
+ } )
346
377
} ,
347
378
348
379
'Load remix with an iframe plugin #group4' : function ( browser : NightwatchBrowser ) {
@@ -355,5 +386,5 @@ module.exports = {
355
386
locateStrategy : 'xpath'
356
387
}
357
388
)
358
- }
389
+ }
359
390
}
0 commit comments