pull/4182/head
filip mertens 11 months ago committed by Joseph Izang
parent b87cd2f8b0
commit 2127096016
  1. 42
      apps/remix-ide-e2e/src/tests/vyper_api.test.ts
  2. 2
      apps/vyper/src/app/components/VyperResult.tsx

@ -47,27 +47,22 @@ module.exports = {
.frame(0)
.click('[data-id="remote-compiler"]')
.click('[data-id="compile"]')
.isVisible({
selector: '[data-id="copy-abi"]',
timeout: 4000,
abortOnFailure: false,
suppressNotFoundErrors: true
}, (okVisible) => {
if (okVisible.value === null) {
console.log('retrying compilation...')
browser.click('[data-id="compile"]').waitForElementVisible('[data-id="copy-abi"]')
} else{
browser.assert.ok(okVisible.value === true, 'ABI should be visible')
}
.waitForElementVisible({
selector:'[data-id="compilation-details"]',
timeout: 60000
})
.click('[data-id="compilation-details"]')
.frameParent()
.waitForElementVisible('[data-id="copy-abi"]')
.waitForElementVisible({
selector: "//*[@class='variable-value' and contains(.,'highestBidder')]",
locateStrategy: 'xpath',
})
},
'Compile test contract and deploy to remix VM #group1': function (browser: NightwatchBrowser) {
let contractAddress
browser
.frameParent()
.clickLaunchIcon('filePanel')
.switchWorkspace('default_workspace')
.addFile('test.vy', { content: testContract })
@ -75,20 +70,13 @@ module.exports = {
// @ts-ignore
.frame(0)
.click('[data-id="compile"]')
.isVisible({
selector: '[data-id="copy-abi"]',
timeout: 4000,
abortOnFailure: false,
suppressNotFoundErrors: true
}, (okVisible) => {
if (okVisible.value === null) {
console.log('retrying compilation...')
browser.click('[data-id="compile"]').waitForElementVisible('[data-id="copy-abi"]')
} else{
browser.assert.ok(okVisible.value === true, 'ABI should be visible')
}
.waitForElementVisible({
selector:'[data-id="compilation-details"]',
timeout: 60000
})
.click('[data-id="compilation-details"]')
.frameParent()
.waitForElementVisible('[data-id="copy-abi"]')
.clickLaunchIcon('udapp')
.createContract('')
.clickInstance(0)

@ -58,7 +58,7 @@ function VyperResult({ output, plugin }: VyperResultProps) {
<>
<div className="border border-top"></div>
<div className="d-flex justify-content-center px-2 w-100">
<button className="btn btn-secondary w-100" onClick={async () => {
<button data-id="compilation-details" className="btn btn-secondary w-100" onClick={async () => {
await plugin?.call('vyperCompilationDetails', 'showDetails', output)
}}>
<span>Compilation Details</span>

Loading…
Cancel
Save