Added data-attributes

pull/1/head
ioedeveloper 5 years ago committed by Aniket
parent 52a077868c
commit 6cad462071
  1. 2
      src/app/tabs/test-tab.js
  2. 10
      test-browser/tests/solidityUnittests.js

@ -239,7 +239,7 @@ module.exports = class TestTab extends ViewPlugin {
}
updateRunAction (currentFile) {
let el = yo`<button id="runTestsTabRunAction" class="${css.runButton} btn btn-primary" onclick="${this.runTests.bind(this)}">Run Tests</button>`
let el = yo`<button id="runTestsTabRunAction" data-id="testTabRunTestsTabRunAction" class="${css.runButton} btn btn-primary" onclick="${this.runTests.bind(this)}">Run Tests</button>`
const isSolidityActive = this.appManager.actives.includes('solidity')
if (!currentFile || !isSolidityActive) {
el.setAttribute('disabled', 'disabled')

@ -43,7 +43,7 @@ module.exports = {
.waitForElementPresent('*[data-id="testTabCheckAllTests"]')
.click('*[data-id="testTabCheckAllTests"]')
.click('.singleTestLabel:nth-of-type(2)')
.scrollAndClick('#runTestsTabRunAction')
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.pause(10000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/simple_storage_test.sol (MyTest)')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ (Initial value should be100)')
@ -58,7 +58,7 @@ module.exports = {
.waitForElementPresent('*[data-id="testTabCheckAllTests"]')
.click('*[data-id="testTabCheckAllTests"]')
.click('.singleTestLabel:nth-of-type(3)')
.scrollAndClick('#runTestsTabRunAction')
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.pause(10000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/ks2b_test.sol (kickstarterTest)')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ (Check project exists)')
@ -70,10 +70,8 @@ module.exports = {
.clickLaunchIcon('fileExplorers')
.switchFile('browser/3_Ballot.sol')
.clickLaunchIcon('solidityUnitTesting')
.scrollAndClick('#runTestsTabRunAction')
.pause(5000)
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]')
.pause(20000)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.pause(30000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/4_Ballot_test.sol (BallotTest)')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ (Check winning proposal)')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ (Check winnin proposal with return value)')

Loading…
Cancel
Save