Commit 848b4cd7 authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #1233 from samccone/sjs/test-tweaks

Fix minor style nits
parents fbaa32f3 84c16ea1
...@@ -25,7 +25,7 @@ module.exports = function Page(browser) { ...@@ -25,7 +25,7 @@ module.exports = function Page(browser) {
// ----------------- navigation methods // ----------------- navigation methods
this.back = function() { this.back = function () {
return browser.navigate().back(); return browser.navigate().back();
}; };
...@@ -60,7 +60,7 @@ module.exports = function Page(browser) { ...@@ -60,7 +60,7 @@ module.exports = function Page(browser) {
// ----------------- DOM element access methods // ----------------- DOM element access methods
this.getFocussedElementId = function () { this.getFocussedElementId = function () {
return browser.switchTo().activeElement().getAttribute('id').then(function(id) { return browser.switchTo().activeElement().getAttribute('id').then(function (id) {
return id; return id;
}); });
}; };
...@@ -152,7 +152,9 @@ module.exports = function Page(browser) { ...@@ -152,7 +152,9 @@ module.exports = function Page(browser) {
return this.getItemLabelAtIndex(index).then(function (itemLabel) { return this.getItemLabelAtIndex(index).then(function (itemLabel) {
// double click is not 'natively' supported, so we need to send the // double click is not 'natively' supported, so we need to send the
// event direct to the element see: // event direct to the element see:
// jscs:disable
// http://stackoverflow.com/questions/3982442/selenium-2-webdriver-how-to-double-click-a-table-row-which-opens-a-new-window // http://stackoverflow.com/questions/3982442/selenium-2-webdriver-how-to-double-click-a-table-row-which-opens-a-new-window
// jscs:enable
browser.executeScript('var evt = document.createEvent("MouseEvents");' + browser.executeScript('var evt = document.createEvent("MouseEvents");' +
'evt.initMouseEvent("dblclick",true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0,null);' + 'evt.initMouseEvent("dblclick",true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0,null);' +
'arguments[0].dispatchEvent(evt);', itemLabel); 'arguments[0].dispatchEvent(evt);', itemLabel);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment