Skip to content

Commit d4cd97c

Browse files
committed
WIP
1 parent 99b873d commit d4cd97c

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

hello/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"webcomponents.js": "^0.7",
1111
"font-awesome": "^4.4",
1212
"typeface-open-sans": "^0.0",
13-
"selenium-webdriver": "^3.5"
13+
"selenium-webdriver": "/home/noya/projects/selenium/repo/javascript/node/selenium-webdriver/selenium-webdriver-4.0.0-dev.tgz"
1414
},
1515
"devDependencies": {
1616
"eslint": "^4.0",

hello/ui_test.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ describe("UI", function() {
6767

6868
// Edit user
6969
let menu = await browser.findElement({css: ".micro-ui-header-user"});
70-
await browser.actions().mouseMove(menu).perform();
71-
await browser.findElement({css: ".micro-ui-edit-user"}).click();
70+
let button = await browser.findElement({css: ".micro-ui-edit-user"});
71+
let actions = browser.actions();
72+
actions.mouse().pointerMove({origin: menu}).click(button);
73+
await actions.perform();
7274
await browser.wait(
7375
untilElementTextLocated({css: "micro-edit-user-page h1"}, "Edit user settings"),
7476
timeout);
@@ -85,13 +87,16 @@ describe("UI", function() {
8587

8688
// View about page
8789
menu = await browser.findElement({css: ".micro-ui-header-menu"});
88-
await browser.actions().mouseMove(menu).perform();
89-
await browser.findElement({css: ".micro-ui-about"}).click();
90+
button = await browser.findElement({css: ".micro-ui-about"});
91+
actions = browser.actions();
92+
// first move down, because moving to the menu item directly will touch the user menu
93+
actions.mouse().pointerMove({origin: menu}).pointerMove({y: 36, origin: "pointer"}).click(button);
94+
await actions.perform();
9095
await browser.wait(
9196
untilElementTextLocated({css: "micro-about-page h1"}, "About Hello"), timeout);
9297
});
9398

94-
it("should work for staff", async function() {
99+
xit("should work for staff", async function() {
95100
// Edit site settings
96101
await browser.get(`${URL}/`);
97102
let menu = await browser.wait(until.elementLocated({css: ".micro-ui-header-menu"}),

0 commit comments

Comments
 (0)