Wait for contact add page to load before doing screenshot diff (#756)

This test is flaky and the going theory is that we take a screenshot
immediately after we click the "Add" button and the CSS hover effect is
somehow still playing on the button.
This commit is contained in:
Lai Jiang 2020-08-10 13:29:47 -04:00 committed by GitHub
parent 05ddabd003
commit cbdf41d75a

View file

@ -238,6 +238,9 @@ class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
Thread.sleep(1000);
driver.waitForElement(By.tagName("h1"));
driver.waitForElement(By.id("reg-app-btn-add")).click();
// Attempt to fix flaky tests. The going theory is that the click button CSS animation needs to
// finish before the screenshot is captured.
Thread.sleep(250);
driver.diffPage("page");
}