Fix failed tests

This commit is contained in:
Buu Nguyen 2016-02-23 19:58:24 -08:00
parent 735f57c252
commit 49e992b4d9
3 changed files with 3 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ tmp
.idea
.DS_Store
submissions.txt
npm-debug.log

View File

@ -54,13 +54,13 @@ PageObject.prototype = {
},
isSidebarShown: function *() {
var hasCssClass = yield this.driver.isElementPresent($css('html.octotree'))
var hasCssClass = yield this.driver.isElementPresent($css('html.octotree-show'))
var btnRight = yield this.toggleButton.getCssValue('right')
return hasCssClass && btnRight === '5px'
},
isSidebarHidden: function *() {
var hasCssClass = yield this.driver.isElementPresent($css('html.octotree'))
var hasCssClass = yield this.driver.isElementPresent($css('html.octotree-show'))
var btnRight = yield this.toggleButton.getCssValue('right')
return !hasCssClass && btnRight === '-35px'
},

View File

@ -63,7 +63,6 @@ function runTest(browser) {
assert.equal(yield po.branchLabel.getText(), 'master')
yield po.setUrl('https://github.com/buunguyen/octotree/tree/v1.6.2')
yield po.toggleSidebar()
assert.equal(yield po.branchLabel.getText(), 'v1.6.2')
})
})
@ -72,7 +71,6 @@ function runTest(browser) {
before(function (cb) {
starx(function *() {
yield po.reset()
yield po.toggleSidebar()
if (token) {
yield po.toggleOptsView()
yield po.tokenInput.sendKeys(token)
@ -227,7 +225,6 @@ function runTest(browser) {
assert.ok(yield po.isSidebarHidden())
}
yield po.reset()
yield po.toggleSidebar()
})
yit('should show in non-code pages if option is set', function *() {