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/simpleContract.js

28 lines
806 B

'use strict';
var testData = require('../mockcompiler/requests');
var contractHelper = require('../helpers/contracts');
module.exports = {
'Simple Contract': function (browser) {
runTests(browser, testData);
}
};
function runTests (browser, testData) {
browser
.url('http://127.0.0.1:8080/#version=builtin')
.waitForElementVisible('.newFile', 10000);
browser.assert.notEqual(testData, null);
testSimpleContract(browser, testData.testSimpleContract.sources.Untitled1, function () {
browser.end();
});
}
function testSimpleContract (browser, contract, callback) {
browser
.click('.newFile')
.clearValue('#input textarea')
.setValue('#input textarea', contract)
.pause('5000');
contractHelper.checkCompiledContracts(browser, ['test1', 'test2'], callback);
}