add one more test. update clone button text

pull/4747/head
Joseph Izang 7 months ago
parent fd4a431176
commit 3809f1b429
  1. 28
      apps/remix-ide-e2e/src/tests/vyper_api.test.ts
  2. 2
      apps/vyper/src/app/app.tsx
  3. 4
      apps/vyper/src/app/utils/compiler.tsx

@ -147,6 +147,34 @@ module.exports = {
browser.verifyCallReturnValue(contractAddress, ['0:uint256: 0']) browser.verifyCallReturnValue(contractAddress, ['0:uint256: 0'])
.perform(() => done()) .perform(() => done())
}) })
},
'Compile Ownable contract from snekmate #group1': function (browser: NightwatchBrowser) {
let contractAddress
browser
.frameParent()
.clickLaunchIcon('filePanel')
.switchWorkspace('snekmate')
.openFile('src')
.openFile('src/snekmate')
.openFile('src/snekmate/auth')
.openFile('src/snekmate/auth/Ownable.vy')
// .click('*[data-id="treeViewLitreeViewItemsrc/snekmate/auth/Ownable.vy"]')
.rightClick('*[data-id="treeViewLitreeViewItemsrc/snekmate/auth/Ownable.vy"]')
.waitForElementVisible('*[data-id="contextMenuItemvyper"]')
.click('*[data-id="contextMenuItemvyper"]')
.clickLaunchIcon('vyper')
// @ts-ignore
.frame(0)
.click('[data-id="compile"]')
.waitForElementVisible({
selector:'[data-id="compilation-details"]',
timeout: 60000
})
.click('[data-id="compilation-details"]')
.frameParent()
.waitForElementVisible('[data-id="copy-abi"]')
.end()
} }
} }

@ -119,7 +119,7 @@ const App = () => {
<div className="px-3 pt-3 mb-3 w-100"> <div className="px-3 pt-3 mb-3 w-100">
<CustomTooltip placement="bottom" tooltipText="Clone Vyper examples. Switch to the File Explorer to see the examples."> <CustomTooltip placement="bottom" tooltipText="Clone Vyper examples. Switch to the File Explorer to see the examples.">
<Button data-id="add-repository" className="w-100 btn btn-secondary" onClick={() => remixClient.cloneVyperRepo()}> <Button data-id="add-repository" className="w-100 btn btn-secondary" onClick={() => remixClient.cloneVyperRepo()}>
Clone Vyper examples repository Clone Snekmate repository
</Button> </Button>
</CustomTooltip> </CustomTooltip>
</div> </div>

@ -148,10 +148,10 @@ const fixContractContent = (content: string) => {
const pragma = '#pragma version ^0.3.10' const pragma = '#pragma version ^0.3.10'
const evmVer = '#pragma evm-version shanghai' const evmVer = '#pragma evm-version shanghai'
if (!evmVerFound) { if (evmVerFound === false) {
content = `${evmVer}\n${content}` content = `${evmVer}\n${content}`
} }
if (!pragmaFound) { if (pragmaFound === false) {
content = `${pragma}\n${content}` content = `${pragma}\n${content}`
} }
return content return content

Loading…
Cancel
Save