add browser tests

pull/1/head
yann300 5 years ago
parent 62a43de74f
commit 0a876d55e5
  1. 1
      src/app.js
  2. 6
      test-browser/helpers/init.js
  3. 17
      test-browser/tests/workspace.js

@ -1,4 +1,3 @@
/* global localStorage */
'use strict'
var isElectron = require('is-electron')

@ -1,14 +1,16 @@
module.exports = function (browser, callback) {
module.exports = function (browser, callback, url, preloadPlugins = true) {
browser
.url('http://127.0.0.1:8080')
.url(url || 'http://127.0.0.1:8080')
.injectScript('test-browser/helpers/applytestmode.js', function () {
browser.resizeWindow(2560, 1440, () => {
if (preloadPlugins) {
initModules(browser, () => {
browser.clickLaunchIcon('solidity').click('#autoCompile')
.perform(function () {
callback()
})
})
} else callback()
})
})
}

@ -0,0 +1,17 @@
'use strict'
var init = require('../helpers/init')
var sauce = require('./sauce')
module.exports = {
before: function (browser, done) {
init(browser, done, 'http://127.0.0.1:8080?plugins=solidity,udapp', false)
},
'CheckSolidityActivatedAndUDapp': function (browser) {
browser
.waitForElementVisible('#icon-panel', 10000)
.clickLaunchIcon('solidity')
.clickLaunchIcon('udapp')
.end()
},
tearDown: sauce
}
Loading…
Cancel
Save