Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FranzPoize committed Feb 9, 2016
1 parent b940821 commit 4f12431
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
3 changes: 2 additions & 1 deletion nightwatch.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"browserstack.user": "${BROWSERSTACK_USERNAME}",
"browserstack.key": "${BROWSERSTACK_KEY}",
"os": "WINDOWS",
"os_version": "8"
"os_version": "8",
"resolution": "1920x1080"
}
},

Expand Down
26 changes: 13 additions & 13 deletions test/Views/toggling.views.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ module.exports = {
'Should be able to toggle views': function (browser) {
browser
.elements('css selector', '#topbar > ul > li', function(result) {
browser.moveTo(result.value[3].ELEMENT)
.waitForElementVisible('#topbar > ul > li:nth-child(4) > ul', 2000)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(1)')
browser.moveTo(result.value[2].ELEMENT)
.waitForElementVisible('#topbar > ul > li:nth-child(3) > ul', 2000)
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(2)')
.waitForElementNotVisible('.prototypo-canvas', 2000)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(1)')
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(2)')
.waitForElementVisible('.prototypo-canvas', 2000)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(2)')
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(3)')
.waitForElementNotPresent('.prototypo-text', 2000)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(2)')
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(3)')
.waitForElementVisible('.prototypo-text', 2000)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(3)')
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(4)')
.waitForElementNotPresent('.prototypo-word', 2000)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(3)')
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(4)')
.waitForElementVisible('.prototypo-word', 2000);
});
},
Expand All @@ -41,14 +41,14 @@ module.exports = {
.waitForElementVisible('.prototypo-canvas', 2000);
browser
.elements('css selector', '#topbar > ul > li', function(result) {
browser.moveTo(result.value[3].ELEMENT)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(3)')
browser.moveTo(result.value[2].ELEMENT)
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(4)')
.waitForElementVisible('.prototypo-word', 2000)
.click('.prototypo-canvas .close-button')
.waitForElementNotPresent('.prototypo-canvas', 2000)
.moveTo(result.value[3].ELEMENT)
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(1)')
.click('.top-bar-menu-item.is-icon-menu ul li:nth-child(2)');
.moveTo(result.value[2].ELEMENT)
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(2)')
.click('#topbar > ul > li:nth-child(3) > ul li:nth-child(3)');
});
},
};
10 changes: 5 additions & 5 deletions test/baseUI/topbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
'Should contain File, Edit, toggle views and glyph list': function(browser) {
browser
.elements('css selector', '#topbar > ul > li', function(result) {
browser.assert.equal(result.value.length, 4);
browser.assert.equal(result.value.length, 8);
});
},
'Should display file menu' : function (browser) {
Expand All @@ -35,16 +35,16 @@ module.exports = {
'Should display toggle views' : function (browser) {
browser
.elements('css selector', '#topbar > ul > li', function(result) {
browser.moveTo(result.value[3].ELEMENT)
.waitForElementVisible('#topbar > ul > li:nth-child(4) > ul', 2000);
browser.moveTo(result.value[2].ELEMENT)
.waitForElementVisible('#topbar > ul > li:nth-child(3) > ul', 2000);
});
},
'Should display glyph list': function (browser) {
browser
.elements('css selector', '#topbar > ul > li', function(result) {
browser.elementIdClick(result.value[2].ELEMENT)
browser.elementIdClick(result.value[4].ELEMENT)
.waitForElementVisible('.glyph-list-glyphs', 2000)
.elementIdClick(result.value[2].ELEMENT)
.elementIdClick(result.value[4].ELEMENT)
.waitForElementNotVisible('.glyph-list-glyphs', 2000).end();
});
},
Expand Down

0 comments on commit 4f12431

Please sign in to comment.