From ddffc45e84bc1a87051e6b81a9771324d4b375a1 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 28 Oct 2021 16:51:58 -0700 Subject: [PATCH] tests: use shorter timeout for in page evals (#675) --- .../java/com/microsoft/playwright/TestLocatorAssertions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java b/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java index 4dd58af4..bfd3a460 100644 --- a/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java +++ b/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java @@ -150,7 +150,7 @@ public class TestLocatorAssertions extends TestBase { Locator locator = page.locator("p"); page.evaluate("setTimeout(() => {\n" + " div.innerHTML = \"

Text 1

Text 2

\";\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 = \"

Text 1

Text 2

\";\n" + - "}, 500);"); + "}, 100);"); try { // Should normalize whitespace. assertThat(locator).hasText(new String[] {"Text 1", "Text 3", "Extra"}, new LocatorAssertions.HasTextOptions().setTimeout(1000));