1
0
mirror of synced 2026-07-06 16:40:01 +00:00

tests: use shorter timeout for in page evals (#675)

This commit is contained in:
Yury Semikhatsky
2021-10-28 16:51:58 -07:00
committed by GitHub
parent e85258908e
commit ddffc45e84
@@ -150,7 +150,7 @@ public class TestLocatorAssertions extends TestBase {
Locator locator = page.locator("p");
page.evaluate("setTimeout(() => {\n" +
" div.innerHTML = \"<p>Text 1</p><p>Text 2</p>\";\n" +
"}, 500);");
"}, 100);");
// Should normalize whitespace.
assertThat(locator).hasText(new String[] {"Text 1", "Text 2"}, new LocatorAssertions.HasTextOptions().setTimeout(1000));
}
@@ -161,7 +161,7 @@ public class TestLocatorAssertions extends TestBase {
Locator locator = page.locator("div");
page.evaluate("setTimeout(() => {\n" +
" div.innerHTML = \"<p>Text 1</p><p>Text 2</p>\";\n" +
"}, 500);");
"}, 100);");
try {
// Should normalize whitespace.
assertThat(locator).hasText(new String[] {"Text 1", "Text 3", "Extra"}, new LocatorAssertions.HasTextOptions().setTimeout(1000));