Skip to content

Commit ac6b8d4

Browse files
yann300Aniket-Engg
authored andcommitted
linting & fix test
1 parent 7de4dd9 commit ac6b8d4

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

apps/remix-ide-e2e/src/tests/transactionExecution.test.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ module.exports = {
370370
'decoded output': { '0':'bool: true' }
371371
}).perform(() => done())
372372
})
373-
.click('*[data-id="universalDappUiUdappPin"]') // pin the contract for later use by a forked state.
374373
// Should fork the mainnet VM fork and execute some transaction
375374
.click('*[data-id="fork-state-icon"]')
376375
.waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]')
@@ -385,7 +384,15 @@ module.exports = {
385384
}
386385
)
387386
.pause(2000)
387+
.perform((done) => {
388+
browser.createContract((currentBlockNumber) + '')
389+
.waitForElementPresent('*[data-shared="universalDappUiInstance"]')
390+
.perform(() => {
391+
done()
392+
})
393+
})
388394
.clickInstance(0)
395+
.click('*[data-id="universalDappUiUdappPin"]') // pin the contract for later use by a forked state.
389396
.clickFunction('getB - call')
390397
.clickFunction('checkBlockNumberIsAdvancing - transact (not payable)')
391398
.perform((done) => {
@@ -442,20 +449,20 @@ module.exports = {
442449
console.log('Test Fork Mainnet', address)
443450
addressRef = address
444451
})
445-
// from Mainnet fork 2, check that block number is at `currentBlockNumber` + 6
446-
.clickFunction('checkOrigin - transact (not payable)', { types: 'uint256 incr', values: '6'})
452+
// from Mainnet fork 2, check that block number is at `currentBlockNumber` + 4
453+
.clickFunction('checkOrigin - transact (not payable)', { types: 'uint256 incr', values: '3'})
447454
.perform((done) => {
448455
browser.testFunction('last',
449456
{
450457
status: '0x1 Transaction mined and execution succeed',
451458
'decoded output': { '0':'bool: true' }
452459
}).perform(() => done())
453460
})
454-
// switch back to Mainnet fork 1 and check that block number is at `currentBlockNumber` + 4
461+
// switch back to Mainnet fork 1 and check that block number is at `currentBlockNumber` + 2
455462
.switchEnvironment('vm-fs-Mainnet fork 1')
456463
.pause(2000)
457464
.clickInstance(0)
458-
.clickFunction('checkOrigin - transact (not payable)', { types: 'uint256 incr', values: '4'})
465+
.clickFunction('checkOrigin - transact (not payable)', { types: 'uint256 incr', values: '1'})
459466
.perform((done) => {
460467
browser.testFunction('last',
461468
{

apps/remix-ide/src/blockchain/blockchain.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ export class Blockchain extends Plugin {
10241024
let stateDetails = await this.call('fileManager', 'readFile', provider.config.statePath)
10251025
stateDetails = JSON.parse(stateDetails)
10261026
state = JSON.parse(state)
1027-
state = JSON.stringify({...stateDetails, ...(state as any)}, null, 2)
1027+
state = JSON.stringify({ ...stateDetails, ...(state as any) }, null, 2)
10281028
}
10291029
this.call('fileManager', 'writeFile', provider.config.statePath, state)
10301030
} else if (isBasicVMState && !isForkedRpcState && !isForkedRpcState) {

0 commit comments

Comments
 (0)