|
|
|
@ -7,13 +7,11 @@ module.exports = { |
|
|
|
|
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
|
|
|
|
init(browser, done) |
|
|
|
|
}, |
|
|
|
|
'Should show text in pinned contracts section #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
'Should show badge in deployed contracts section #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
|
.assert.elementPresent('*[data-id="pinnedContracts"]') |
|
|
|
|
.assert.textContains('*[data-id="pinnedContractsSublabel"]', '(network: vm-cancun)') |
|
|
|
|
.assert.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
|
.assert.textContains('*[data-id="NoPinnedInstanceText"]', 'No pinned contracts found for selected workspace & network') |
|
|
|
|
.assert.elementPresent('*[data-id="deployedContracts"]') |
|
|
|
|
.assert.textContains('*[data-id="deployedContractsBadge"]', '0') |
|
|
|
|
}, |
|
|
|
|
'Deploy & pin contract #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
@ -24,22 +22,18 @@ module.exports = { |
|
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
|
.click('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
|
.assert.elementPresent('*[data-id="unpinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
|
.assert.textContains('*[data-id="deployedContractsBadge"]', '1') |
|
|
|
|
.click('*[data-id="universalDappUiUdappPin"]') |
|
|
|
|
.assert.elementPresent('*[data-id="deployAndRunNoInstanceText"]') |
|
|
|
|
.assert.textContains('*[data-id="deployAndRunNoInstanceText"]', 'Currently you have no unpinned contracts to interact with.') |
|
|
|
|
.assert.not.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
|
.assert.elementPresent('*[data-id="universalDappUiUdappUnpin"]') |
|
|
|
|
.assert.elementPresent('*[data-id="pinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
|
}, |
|
|
|
|
'Test pinned contract loading on environment change #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.switchEnvironment('vm-shanghai') |
|
|
|
|
.assert.elementPresent('*[data-id="pinnedContracts"]') |
|
|
|
|
.assert.textContains('*[data-id="pinnedContractsSublabel"]', '(network: vm-shanghai)') |
|
|
|
|
.assert.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
|
.assert.textContains('*[data-id="NoPinnedInstanceText"]', 'No pinned contracts found for selected workspace & network') |
|
|
|
|
.assert.elementPresent('*[data-id="deployedContracts"]') |
|
|
|
|
.assert.textContains('*[data-id="deployedContractsBadge"]', '0') |
|
|
|
|
.switchEnvironment('vm-cancun') |
|
|
|
|
.assert.textContains('*[data-id="pinnedContractsSublabel"]', '(network: vm-cancun)') |
|
|
|
|
.assert.not.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
|
.assert.textContains('*[data-id="deployedContractsBadge"]', '1') |
|
|
|
|
.assert.elementPresent('*[data-id="pinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
|
}, |
|
|
|
|
'Interact with pinned contract #group1': function (browser: NightwatchBrowser) { |
|
|
|
@ -71,9 +65,6 @@ module.exports = { |
|
|
|
|
'Unpin & interact #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('*[data-id="universalDappUiUdappUnpin"]') |
|
|
|
|
.assert.textContains('*[data-id="NoPinnedInstanceText"]', 'No pinned contracts found for selected workspace & network') |
|
|
|
|
.assert.not.elementPresent('*[data-id="deployAndRunNoInstanceText"]') |
|
|
|
|
.click('*[data-id="universalDappUiTitleExpander0"]') |
|
|
|
|
.assert.not.elementPresent('*[data-id="instanceContractPinnedAt"]') |
|
|
|
|
.assert.not.elementPresent('*[data-id="instanceContractFilePath"]') |
|
|
|
|
.clickFunction('retrieve - call') |
|
|
|
@ -95,12 +86,11 @@ module.exports = { |
|
|
|
|
'decoded output': { "0": "uint256: 55" } |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
'Re-pin & delete immediately #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
'Re-pin & remove from list #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('*[data-id="universalDappUiUdappPin"]') |
|
|
|
|
.assert.elementPresent('*[data-id="deployAndRunNoInstanceText"]') |
|
|
|
|
.click('*[data-id="universalDappUiUdappDelete"]') |
|
|
|
|
.assert.textContains('*[data-id="NoPinnedInstanceText"]', 'No pinned contracts found for selected workspace & network') |
|
|
|
|
.assert.textContains('*[data-id="deployAndRunNoInstanceText"]', 'Currently you have no unpinned contracts to interact with.') |
|
|
|
|
.assert.textContains('*[data-id="deployedContractsBadge"]', '1') |
|
|
|
|
.click('*[data-id="universalDappUiUdappClose"]') |
|
|
|
|
.assert.textContains('*[data-id="deployedContractsBadge"]', '0') |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|