pull/7/head
yann300 8 years ago
parent 8ba5b9e617
commit 32ce4f50f2
  1. 1
      nightwatch.js
  2. 6
      src/BasicPanel.js
  3. 4
      src/CalldataPanel.js
  4. 4
      src/CallstackPanel.js
  5. 4
      src/MemoryPanel.js
  6. 4
      src/StackPanel.js
  7. 4
      src/StoragePanel.js
  8. 8
      test-browser/init.js

@ -62,6 +62,7 @@ module.exports = {
'desiredCapabilities': { 'desiredCapabilities': {
'browserName': 'safari', 'browserName': 'safari',
'javascriptEnabled': true, 'javascriptEnabled': true,
'platform': 'MAC',
'acceptSslCerts': true, 'acceptSslCerts': true,
'build': 'build-' + TRAVIS_JOB_NUMBER, 'build': 'build-' + TRAVIS_JOB_NUMBER,
'tunnel-identifier': 'remix_tests_' + TRAVIS_JOB_NUMBER 'tunnel-identifier': 'remix_tests_' + TRAVIS_JOB_NUMBER

@ -3,11 +3,9 @@ var style = require('./styles/basicStyles')
var yo = require('yo-yo') var yo = require('yo-yo')
var ui = require('./helpers/ui') var ui = require('./helpers/ui')
function BasicPanel (_name, _id) { function BasicPanel (_name) {
this.data this.data
this.name = _name this.name = _name
this.id = _id
this.view this.view
} }
@ -21,7 +19,7 @@ BasicPanel.prototype.render = function () {
${this.name} ${this.name}
</div> </div>
<div style=${ui.formatCss(style.panel.tableContainer)}> <div style=${ui.formatCss(style.panel.tableContainer)}>
<pre style=${ui.formatCss(style.panel.table, style.font)} id='${this.id}basicpanel' >${this.data}</pre> <pre style=${ui.formatCss(style.panel.table, style.font)} id='basicpanel' >${this.data}</pre>
</div> </div>
</div>` </div>`
if (!this.view) { if (!this.view) {

@ -5,12 +5,12 @@ var yo = require('yo-yo')
function CalldataPanel (_parent, _traceManager) { function CalldataPanel (_parent, _traceManager) {
this.parent = _parent this.parent = _parent
this.traceManager = _traceManager this.traceManager = _traceManager
this.basicPanel = new BasicPanel('Call Data', 'calldatapanel') this.basicPanel = new BasicPanel('Call Data')
this.init() this.init()
} }
CalldataPanel.prototype.render = function () { CalldataPanel.prototype.render = function () {
return yo`<div>${this.basicPanel.render()}</div>` return yo`<div id='calldatapanel' >${this.basicPanel.render()}</div>`
} }
CalldataPanel.prototype.init = function () { CalldataPanel.prototype.init = function () {

@ -5,12 +5,12 @@ var yo = require('yo-yo')
function CallstackPanel (_parent, _traceManager) { function CallstackPanel (_parent, _traceManager) {
this.parent = _parent this.parent = _parent
this.traceManager = _traceManager this.traceManager = _traceManager
this.basicPanel = new BasicPanel('Call Stack', 'callstackpanel') this.basicPanel = new BasicPanel('Call Stack')
this.init() this.init()
} }
CallstackPanel.prototype.render = function () { CallstackPanel.prototype.render = function () {
return yo`<div>${this.basicPanel.render()}</div>` return yo`<div id='callstackpanel' >${this.basicPanel.render()}</div>`
} }
CallstackPanel.prototype.init = function () { CallstackPanel.prototype.init = function () {

@ -6,12 +6,12 @@ var yo = require('yo-yo')
function MemoryPanel (_parent, _traceManager) { function MemoryPanel (_parent, _traceManager) {
this.parent = _parent this.parent = _parent
this.traceManager = _traceManager this.traceManager = _traceManager
this.basicPanel = new BasicPanel('Memory', 'memorypanel') this.basicPanel = new BasicPanel('Memory')
this.init() this.init()
} }
MemoryPanel.prototype.render = function () { MemoryPanel.prototype.render = function () {
return yo`<div>${this.basicPanel.render()}</div>` return yo`<div id='memorypanel' >${this.basicPanel.render()}</div>`
} }
MemoryPanel.prototype.init = function () { MemoryPanel.prototype.init = function () {

@ -6,12 +6,12 @@ var yo = require('yo-yo')
function StackPanel (_parent, _traceManager) { function StackPanel (_parent, _traceManager) {
this.parent = _parent this.parent = _parent
this.traceManager = _traceManager this.traceManager = _traceManager
this.basicPanel = new BasicPanel('Stack', 'stackpanel') this.basicPanel = new BasicPanel('Stack')
this.init() this.init()
} }
StackPanel.prototype.render = function () { StackPanel.prototype.render = function () {
return yo`<div>${this.basicPanel.render()}</div>` return yo`<div id='stackpanel' >${this.basicPanel.render()}</div>`
} }
StackPanel.prototype.init = function () { StackPanel.prototype.init = function () {

@ -5,12 +5,12 @@ var yo = require('yo-yo')
function StoragePanel (_parent, _traceManager) { function StoragePanel (_parent, _traceManager) {
this.parent = _parent this.parent = _parent
this.traceManager = _traceManager this.traceManager = _traceManager
this.basicPanel = new BasicPanel('Storage Changes', 'storagepanel') this.basicPanel = new BasicPanel('Storage Changes')
this.init() this.init()
} }
StoragePanel.prototype.render = function () { StoragePanel.prototype.render = function () {
return yo`<div>${this.basicPanel.render()}</div>` return yo`<div id='storagepanel' >${this.basicPanel.render()}</div>`
} }
StoragePanel.prototype.init = function () { StoragePanel.prototype.init = function () {

@ -167,12 +167,12 @@ browser.fireEvent = function (el, key, times, callback) {
} }
function assertPanel (id, browser, value) { function assertPanel (id, browser, value) {
browser.expect.element(id + 'basicpanel').text.to.equal(value) browser.expect.element(id + ' #basicpanel').text.to.equal(value)
return browser return browser
} }
function assertPanelValue (id, browser, index, value) { function assertPanelValue (id, browser, index, value) {
getInnerText(id + 'basicpanel', browser, function (result) { getInnerText(id + ' #basicpanel', browser, function (result) {
var values var values
if (result.value.indexOf('\r\n') !== -1) { if (result.value.indexOf('\r\n') !== -1) {
values = result.value.split('\r\n') values = result.value.split('\r\n')
@ -188,8 +188,8 @@ function assertPanelValue (id, browser, index, value) {
function getInnerText (id, browser, callback) { function getInnerText (id, browser, callback) {
browser.execute(function (data) { browser.execute(function (data) {
return document.getElementById(data).innerText return document.querySelector(data).innerText
}, [id.substring(1)], function (result) { }, [id], function (result) {
callback(result) callback(result)
}) })
} }

Loading…
Cancel
Save