|
|
@ -96,6 +96,17 @@ const tests = { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
'Should deploy faulty contract on Sepolia Test Network using MetaMask and show error in terminal #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
|
|
|
browser |
|
|
|
|
|
|
|
.clearConsole() |
|
|
|
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
|
|
|
.addFile('faulty.sol', sources[1]['faulty.sol']) |
|
|
|
|
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
|
|
|
|
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
|
|
|
|
.click('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
|
|
|
|
.pause(5000) |
|
|
|
|
|
|
|
.saveScreenshot('./reports/screenshots/metamask_7.png') |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// end of group 1
|
|
|
|
/// end of group 1
|
|
|
@ -286,9 +297,13 @@ const tests = { |
|
|
|
const branch = process.env.CIRCLE_BRANCH; |
|
|
|
const branch = process.env.CIRCLE_BRANCH; |
|
|
|
const isMasterBranch = branch === 'master'; |
|
|
|
const isMasterBranch = branch === 'master'; |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
if (!checkBrowserIsChrome(browser)) { |
|
|
|
|
|
|
|
module.exports = {} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
...tests //(branch ? (isMasterBranch ? tests : {}) : tests),
|
|
|
|
...tests //(branch ? (isMasterBranch ? tests : {}) : tests),
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const localsCheck = { |
|
|
|
const localsCheck = { |
|
|
|
to: { |
|
|
|
to: { |
|
|
@ -325,6 +340,18 @@ const sources = [ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}` |
|
|
|
}` |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'faulty.sol': { |
|
|
|
|
|
|
|
content: `// SPDX-License-Identifier: GPL-3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pragma solidity >=0.8.2 <0.9.0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contract Test { |
|
|
|
|
|
|
|
error O_o(uint256); |
|
|
|
|
|
|
|
constructor() { |
|
|
|
|
|
|
|
revert O_o(block.timestamp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}` |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|