Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/wrappers/pages.js

Issue 29891677: Noissue - Make subscribe link tests more reliable by waiting for options page to be ready (Closed)
Patch Set: Increased timeout for options page tab as requested by Ross Created Sept. 26, 2018, 11:06 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/wrappers/pages.js
===================================================================
--- a/test/wrappers/pages.js
+++ b/test/wrappers/pages.js
@@ -21,7 +21,7 @@
const assert = require("assert");
const Jimp = require("jimp");
-const {By} = require("selenium-webdriver");
+const {By, until} = require("selenium-webdriver");
// Once we require Node.js >= 10 this should be replaced with
// the built-in finally() method of the Promise object.
@@ -54,12 +54,13 @@
driver.wait(() =>
driver.getAllWindowHandles().then(handles =>
handles.length > 2 ? handles : null
- ), 1000
+ ), 3000
)
).then(handles =>
closeWindow(driver, handles[2], handles[1], () =>
- driver.switchTo().frame(0).then(() =>
- driver.findElement(By.id("dialog-content-predefined"))
+ driver.wait(until.ableToSwitchToFrame(0), 1000).then(() =>
+ driver.wait(until.elementLocated(By.id("dialog-content-predefined")),
+ 1000)
).then(dialog =>
Promise.all([
dialog.isDisplayed(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld