Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
848b4cd7
Commit
848b4cd7
authored
Mar 26, 2015
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1233 from samccone/sjs/test-tweaks
Fix minor style nits
parents
fbaa32f3
84c16ea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
browser-tests/page.js
browser-tests/page.js
+4
-2
No files found.
browser-tests/page.js
View file @
848b4cd7
...
...
@@ -25,7 +25,7 @@ module.exports = function Page(browser) {
// ----------------- navigation methods
this
.
back
=
function
()
{
this
.
back
=
function
()
{
return
browser
.
navigate
().
back
();
};
...
...
@@ -60,7 +60,7 @@ module.exports = function Page(browser) {
// ----------------- DOM element access methods
this
.
getFocussedElementId
=
function
()
{
return
browser
.
switchTo
().
activeElement
().
getAttribute
(
'
id
'
).
then
(
function
(
id
)
{
return
browser
.
switchTo
().
activeElement
().
getAttribute
(
'
id
'
).
then
(
function
(
id
)
{
return
id
;
});
};
...
...
@@ -152,7 +152,9 @@ module.exports = function Page(browser) {
return
this
.
getItemLabelAtIndex
(
index
).
then
(
function
(
itemLabel
)
{
// double click is not 'natively' supported, so we need to send the
// 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
// jscs:enable
browser
.
executeScript
(
'
var evt = document.createEvent("MouseEvents");
'
+
'
evt.initMouseEvent("dblclick",true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0,null);
'
+
'
arguments[0].dispatchEvent(evt);
'
,
itemLabel
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment