remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/test-browser/tests/solidityUnittests.js

35 lines
1.1 KiB

'use strict'
var init = require('../helpers/init')
var sauce = require('./sauce')
var sources = []
module.exports = {
before: function (browser, done) {
init(browser, done)
},
'@sources': function () {
return sources
},
'Solidity Unittests': function (browser) {
runTests(browser)
},
tearDown: sauce
}
function runTests (browser) {
browser
.waitForElementVisible('#icon-panel', 10000)
.click('#icon-panel div[plugin="pluginManager"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidityUnitTesting"] button')
.clickLaunchIcon('fileExplorers')
.switchFile('browser/3_Ballot.sol')
.clickLaunchIcon('solidityUnitTesting')
.scrollAndClick('#runTestsTabRunAction')
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]')
.pause(10000)
.assert.containsText('#solidityUnittestsOutput', 'browser/4_Ballot_test.sol (BallotTest)')
.assert.containsText('#solidityUnittestsOutput', '✓ (Check winning proposal)')
.assert.containsText('#solidityUnittestsOutput', '✓ (Check winnin proposal with return value)')
.end()
}