pull/1/head
yann300 7 years ago
parent 0a8eef9ce7
commit 92871429b2
  1. BIN
      ci/BrowserStackLocal
  2. 2
      contracts/contract1.sol
  3. 2
      contracts/folder1/contract1.sol
  4. 0
      contracts/folder1/contract_firefox.sol
  5. 1
      contracts/folder1/contract_firefox_toremove.sol
  6. 1
      nightwatch.js
  7. 3
      package.json
  8. 11
      test-browser/helpers/init.js
  9. 19
      test-browser/tests/compiling.js
  10. 9
      test-browser/tests/sharedFolderExplorer.js

Binary file not shown.

@ -1 +1 @@
contract test1 { function get () returns (uint) { return 10; }}
contract test1 { function get () returns (uint) { return 8; }}

@ -1 +1 @@
contract test1 { function get () returns (uint) { return 10; }}
contract test1 { function get () returns (uint) { return 10; }}

@ -0,0 +1 @@
contract test2 { function get () returns (uint) { return 11; }}

@ -28,7 +28,6 @@ module.exports = {
'path': ''
},
'desiredCapabilities': {
'screenResolution': '2560x1600',
'browserName': 'firefox',
'javascriptEnabled': true,
'acceptSslCerts': true,

@ -173,6 +173,5 @@
"test": "npm run csslint; standard && node test/index.js",
"test-browser": "npm-run-all -lpr selenium downloadsolc make-mock-compiler serve browsertest",
"watch": "watchify src/index.js -dv -p browserify-reload -o build/app.js"
},
"dependencies": {}
}
}

@ -2,10 +2,11 @@ module.exports = function (browser, callback) {
browser
.url('http://127.0.0.1:8080/#version=builtin')
.injectScript('test-browser/helpers/applytestmode.js', function () {
browser.resizeWindow(2560, 1440, callback)
.click('#autoCompile')
.perform(function () {
callback()
})
browser.resizeWindow(2560, 1440, () => {
browser.click('#autoCompile')
.perform(function () {
callback()
})
})
})
}

@ -73,11 +73,12 @@ function testReturnValues (browser, callback) {
.testFunction('retunValues1 - transact (not payable)',
'0x79dc928d149d2ade02ab610a8ae290636222d034d4adce0bb08a68401e3d1f7f',
`[vm]\nfrom:0xca3...a733c\nto:testReturnValues.retunValues1() 0x5e7...26e9f\nvalue:0 wei\ndata:0x9ed...59eb7\nlogs:0\nhash:0x79d...d1f7f`,
null, `{
"0": "bool: _b true",
"1": "uint256: _u 345",
"2": "int256: _i -345",
"3": "address: _a 0xca35b7d915458ef540ade6068dfe2f44e8fa733c"
null,
`{
"0": "bool: _b true",
"1": "uint256: _u 345",
"2": "int256: _i -345",
"3": "address: _a 0xca35b7d915458ef540ade6068dfe2f44e8fa733c"
}`)
.pause(500)
.testFunction('retunValues2 - transact (not payable)',
@ -143,8 +144,8 @@ function testInputValues (browser, callback) {
var sources = [
{'browser/Untitled.sol': {content: `pragma solidity ^0.4.0;
contract TestContract { function f() returns (uint) { return 8; }
function g() returns (uint, string, bool, uint) {
contract TestContract { function f() returns (uint) { return 8; }
function g() returns (uint, string, bool, uint) {
uint payment = 345;
bool payed = true;
string memory comment = "comment_comment_";
@ -159,7 +160,7 @@ var sources = [
_i = -345;
_a = msg.sender;
}
function retunValues2 () returns (byte _b, bytes2 _b2, bytes3 _b3, bytes _blit, bytes5 _b5, bytes6 _b6, string _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) {
_b = 0x12;
_b2 = 0x1223;
@ -171,7 +172,7 @@ var sources = [
_blit = hex"123498";
_str = "this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string";
}
function retunValues3 () returns (ActionChoices _en, int[5][] _a1) {
_en = ActionChoices.GoStraight;
int[5][] memory a = new int[5][](3);

@ -20,7 +20,6 @@ contract gmbh {
}
}
`
var sources = [
{
'localhost/folder1/contract2.sol': {content: 'contract test2 { function get () returns (uint) { return 11; }}'}
@ -79,25 +78,25 @@ function runTests (browser, testData) {
.click('[data-path="localhost/folder1/contract1.sol"]') // open localhost/folder1/contract1.sol
.pause(1000)
.perform(function (done) { // check the content and replace by another
browser.testEditorValue('contract test1 { function get () returns (uint) { return 10; }}\n', () => {
browser.testEditorValue('contract test1 { function get () returns (uint) { return 10; }}', () => {
console.log('testEditorValue')
done()
})
})
.perform(function (done) {
browser.setEditorValue('contract test1Changed { function get () returns (uint) { return 10; }}\n', () => {
browser.setEditorValue('contract test1Changed { function get () returns (uint) { return 10; }}', () => {
console.log('setEditorValue')
done()
})
})
.perform(function (done) {
browser.testEditorValue('contract test1Changed { function get () returns (uint) { return 10; }}\n', () => {
browser.testEditorValue('contract test1Changed { function get () returns (uint) { return 10; }}', () => {
console.log('testEditorValue')
done()
})
})
.perform(function (done) {
browser.setEditorValue('contract test1 { function get () returns (uint) { return 10; }}\n', () => {
browser.setEditorValue('contract test1 { function get () returns (uint) { return 10; }}', () => {
console.log('setEditorValue')
done()
})

Loading…
Cancel
Save