pull/5772/head
yann300 1 week ago
parent be59139548
commit 563e2bac8f
  1. 7
      apps/remix-ide-e2e/src/tests/vm_state.test.ts

@ -88,7 +88,7 @@ const tests = {
browser.assert.ok(content.indexOf(`"db":`) !== -1) browser.assert.ok(content.indexOf(`"db":`) !== -1)
browser.assert.ok(content.indexOf(`"blocks":`) !== -1) browser.assert.ok(content.indexOf(`"blocks":`) !== -1)
}) })
// fork again this state // fork again this state. The name of the new forked state will be forkedState_2
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.click('*[data-id="fork-state-icon"]') .click('*[data-id="fork-state-icon"]')
.waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]') .waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]')
@ -103,13 +103,13 @@ const tests = {
.perform(() => done()) .perform(() => done())
}) })
.clickInstance(0) .clickInstance(0)
// check that the state is loaded // check that the state is correct
.clickFunction('retrieve - call') .clickFunction('retrieve - call')
.testFunction('last', .testFunction('last',
{ {
'decoded output': { '0': 'uint256: 55' } 'decoded output': { '0': 'uint256: 55' }
}) })
// update the state // update the state and check it's correctly applied
.clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"57"' }) .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"57"' })
.testFunction('last', .testFunction('last',
{ {
@ -122,6 +122,7 @@ const tests = {
'decoded output': { '0': 'uint256: 57' } 'decoded output': { '0': 'uint256: 57' }
}) })
// switch back to the previous state and check the value hasn't changed. // switch back to the previous state and check the value hasn't changed.
.clickLaunchIcon('filePanel')
.switchWorkspace('forkedState_1') .switchWorkspace('forkedState_1')
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.openFile('contracts/1_Storage.sol') .openFile('contracts/1_Storage.sol')

Loading…
Cancel
Save