foundry test

pull/5370/head
bunsenstraat 5 months ago
parent 345b0023b6
commit aa567cacdd
  1. 23
      apps/remixdesktop/test/tests/app/foundry.test.ts

@ -26,7 +26,7 @@ const tests = {
}, [dir], () => {
console.log('done window opened')
})
.waitForElementVisible('*[data-id="treeViewDivDraggableItemhardhat.config.js"]', 10000)
.waitForElementVisible('*[data-id="treeViewDivDraggableItemfoundry.toml"]', 10000)
},
compile: function (browser: NightwatchBrowser) {
browser.perform(async (done) => {
@ -35,6 +35,25 @@ const tests = {
done()
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Foundry').before(60000)
let contractAaddress
browser.clickLaunchIcon('filePanel')
.openFile('src')
.openFile('src/Counter.sol')
.clickLaunchIcon('udapp')
.selectContract('Counter')
.createContract('')
.getAddressAtPosition(0, (address) => {
console.log(contractAaddress)
contractAaddress = address
})
.clickInstance(0)
.clickFunction('increment - transact (not payable)')
.perform((done) => {
browser.testConstantFunction(contractAaddress, 'number - call', null, '0:\nuint256: 1').perform(() => {
done()
})
})
}
}
async function downloadFoundry(): Promise<void> {
@ -128,5 +147,5 @@ async function downloadFoundry(): Promise<void> {
module.exports = {
...tests
...process.platform.startsWith('linux') ? tests : {}
}
Loading…
Cancel
Save