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: Created Sept. 25, 2018, 7:46 p.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.
@@ -58,8 +58,9 @@
)
).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(() =>
tlucas 2018/09/26 08:28:17 In order to not reject subscriptions, which might
Sebastian Noack 2018/09/26 11:07:36 But if there is a bug (caught by this test) with t
tlucas 2018/09/26 18:19:40 Acknowledged.
+ 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