-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add screenshot tests for the new registrar console #2577
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 12 of 95 files at r1, all commit messages.
Reviewable status: 12 of 95 files reviewed, 2 unresolved discussions (waiting on @gbrodman)
core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java
line 41 at r1 (raw file):
* because we aren't really serving the webapp the same way that an actual webserver (e.g. Express) * would, we're just statically serving the distribution. As a result, we cannot load URLs, e.g. * "/#/settings", directly.
Can you elaborate on why we can't load URLs? All navigation happens within the webapp via angular router, so as long as URL is correct, webapp should handle it.
core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java
line 43 at r1 (raw file):
* "/#/settings", directly. */ public class ConsoleScreenshotTest extends WebDriverTestCase {
Hmm all those retries and sleeps make me a uneasy about this approach. Is it possible to replace with something more explicit, like:
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, "myDynamicElement"))
Code quote:
T
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 12 of 95 files reviewed, 2 unresolved discussions (waiting on @ptkach)
core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java
line 41 at r1 (raw file):
Previously, ptkach (Pavlo Tkach) wrote…
Can you elaborate on why we can't load URLs? All navigation happens within the webapp via angular router, so as long as URL is correct, webapp should handle it.
It's because that routing depends on the existence of the express (?) server than handles routing in general, that anything under /console should go to the console routing service. Here we're dealing with the raw pages (like, we're loading /console/index.html directly) we can't count on any routing.
core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java
line 43 at r1 (raw file):
Previously, ptkach (Pavlo Tkach) wrote…
Hmm all those retries and sleeps make me a uneasy about this approach. Is it possible to replace with something more explicit, like:
WebDriverWait(driver, 10).until( EC.presence_of_element_located((By.ID, "myDynamicElement"))
The issue is that much of the time we're waiting on an effect (like a highlighting, or a shadow) to fade to make sure we can get a reliable constant color/image. Otherwise, we end up with e.g. spurious failures caused by slight degrees of a button's highlighting fading after we click on it.
gonna wait until approval to fix the merge conflicts in the lockfiles, to avoid extra work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, thanks! How does it compare to the old console wrt running time? Is it faster?
Reviewed 83 of 95 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @gbrodman)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems pretty similar!
Reviewable status: 81 of 95 files reviewed, all discussions resolved (waiting on @ptkach)
This required updating to a newer version of Selenium, building the console dist/ folder, and serving that folder.
This required updating to a newer version of Selenium, building the console dist/ folder, and serving that folder.
This change is