|
|
@ -29,7 +29,7 @@ module.exports = { |
|
|
|
.assert.textContains('*[data-id="deployAndRunNoInstanceText"]', 'Currently you have no unpinned contracts to interact with.') |
|
|
|
.assert.textContains('*[data-id="deployAndRunNoInstanceText"]', 'Currently you have no unpinned contracts to interact with.') |
|
|
|
.assert.not.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
.assert.not.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
.assert.elementPresent('*[data-id="pinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
.assert.elementPresent('*[data-id="pinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
}, |
|
|
|
}, |
|
|
|
'Test pinned contract loading on environment change #group1': function (browser: NightwatchBrowser) { |
|
|
|
'Test pinned contract loading on environment change #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.switchEnvironment('vm-shanghai') |
|
|
|
.switchEnvironment('vm-shanghai') |
|
|
@ -41,7 +41,7 @@ module.exports = { |
|
|
|
.assert.textContains('*[data-id="pinnedContractsSublabel"]', '(network: vm-cancun)') |
|
|
|
.assert.textContains('*[data-id="pinnedContractsSublabel"]', '(network: vm-cancun)') |
|
|
|
.assert.not.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
.assert.not.elementPresent('*[data-id="NoPinnedInstanceText"]') |
|
|
|
.assert.elementPresent('*[data-id="pinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
.assert.elementPresent('*[data-id="pinnedInstance0xd9145CCE52D386f254917e481eB44e9943F39138"]') |
|
|
|
}, |
|
|
|
}, |
|
|
|
'Interact with pinned contract #group1': function (browser: NightwatchBrowser) { |
|
|
|
'Interact with pinned contract #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.click('*[data-id="universalDappUiTitleExpander0"]') |
|
|
|
.click('*[data-id="universalDappUiTitleExpander0"]') |
|
|
@ -51,23 +51,23 @@ module.exports = { |
|
|
|
.assert.textContains('*[data-id="instanceContractFilePath"]', 'default_workspace/contracts/1_Storage.sol') |
|
|
|
.assert.textContains('*[data-id="instanceContractFilePath"]', 'default_workspace/contracts/1_Storage.sol') |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.testFunction('last', |
|
|
|
.testFunction('last', |
|
|
|
{ |
|
|
|
{ |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
'decoded output': { "0": "uint256: 0" } |
|
|
|
'decoded output': { "0": "uint256: 0" } |
|
|
|
}) |
|
|
|
}) |
|
|
|
.clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '35' }) |
|
|
|
.clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '35' }) |
|
|
|
.testFunction('last', |
|
|
|
.testFunction('last', |
|
|
|
{ |
|
|
|
{ |
|
|
|
status: '0x1 Transaction mined and execution succeed', |
|
|
|
status: '0x1 Transaction mined and execution succeed', |
|
|
|
'decoded input': { "uint256 num": "35" } |
|
|
|
'decoded input': { "uint256 num": "35" } |
|
|
|
}) |
|
|
|
}) |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.testFunction('last', |
|
|
|
.testFunction('last', |
|
|
|
{ |
|
|
|
{ |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
'decoded output': { "0": "uint256: 35" } |
|
|
|
'decoded output': { "0": "uint256: 35" } |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
'Unpin & interact #group1': function (browser: NightwatchBrowser) { |
|
|
|
'Unpin & interact #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.click('*[data-id="universalDappUiUdappUnpin"]') |
|
|
|
.click('*[data-id="universalDappUiUdappUnpin"]') |
|
|
@ -78,23 +78,23 @@ module.exports = { |
|
|
|
.assert.not.elementPresent('*[data-id="instanceContractFilePath"]') |
|
|
|
.assert.not.elementPresent('*[data-id="instanceContractFilePath"]') |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.testFunction('last', |
|
|
|
.testFunction('last', |
|
|
|
{ |
|
|
|
{ |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
'decoded output': { "0": "uint256: 35" } |
|
|
|
'decoded output': { "0": "uint256: 35" } |
|
|
|
}) |
|
|
|
}) |
|
|
|
.clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '55' }) |
|
|
|
.clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '55' }) |
|
|
|
.testFunction('last', |
|
|
|
.testFunction('last', |
|
|
|
{ |
|
|
|
{ |
|
|
|
status: '0x1 Transaction mined and execution succeed', |
|
|
|
status: '0x1 Transaction mined and execution succeed', |
|
|
|
'decoded input': { "uint256 num": "55" } |
|
|
|
'decoded input': { "uint256 num": "55" } |
|
|
|
}) |
|
|
|
}) |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.clickFunction('retrieve - call') |
|
|
|
.testFunction('last', |
|
|
|
.testFunction('last', |
|
|
|
{ |
|
|
|
{ |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
to: 'Storage.retrieve() 0xd9145CCE52D386f254917e481eB44e9943F39138', |
|
|
|
'decoded output': { "0": "uint256: 55" } |
|
|
|
'decoded output': { "0": "uint256: 55" } |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
'Re-pin & delete immediately #group1': function (browser: NightwatchBrowser) { |
|
|
|
'Re-pin & delete immediately #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.click('*[data-id="universalDappUiUdappPin"]') |
|
|
|
.click('*[data-id="universalDappUiUdappPin"]') |
|
|
@ -102,5 +102,5 @@ module.exports = { |
|
|
|
.click('*[data-id="universalDappUiUdappDelete"]') |
|
|
|
.click('*[data-id="universalDappUiUdappDelete"]') |
|
|
|
.assert.textContains('*[data-id="NoPinnedInstanceText"]', 'No pinned contracts found for selected workspace & network') |
|
|
|
.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="deployAndRunNoInstanceText"]', 'Currently you have no unpinned contracts to interact with.') |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|