Skip to content

Commit 2046dc8

Browse files
committed
fix tests
1 parent 204d316 commit 2046dc8

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

playwright/src/test/java/com/microsoft/playwright/TestPageClock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ void whileRunningShouldPause(Page page) {
391391
page.clock().install(new Clock.InstallOptions().setTime(0));
392392
page.navigate("data:text/html,");
393393
page.clock().pauseAt(1000);
394-
page.waitForTimeout(1000);
395-
page.clock().resume();
394+
// Internally wait to make sure the clock is paused and not running.
395+
page.waitForTimeout(1111);
396396
int now = (int) page.evaluate("() => Date.now()");
397397
assertTrue(now >= 0 && now <= 1000);
398398
}

playwright/src/test/java/com/microsoft/playwright/TestPageInterception.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,4 @@ void shouldNotFollowRedirectsWhenMaxRedirectsIsSetTo0InRouteFetch() {
139139
page.navigate(server.PREFIX + "/foo");
140140
assertTrue(page.content().contains("hello"));
141141
}
142-
143-
@Test
144-
void shouldProperlyHandleCharacterSetsInGlobs() {
145-
page.route("**/[a-z]*.html", route -> {
146-
APIResponse response = route.fetch(new Route.FetchOptions().setUrl(server.PREFIX + "/one-style.html"));
147-
route.fulfill(new Route.FulfillOptions().setResponse(response));
148-
});
149-
Response response = page.navigate(server.PREFIX + "/empty.html");
150-
assertEquals(200, response.status());
151-
assertTrue(response.text().contains("one-style.css"), response.text());
152-
}
153142
}

playwright/src/test/java/com/microsoft/playwright/TestPageRoute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void shouldSupportQuestionMarkInGlobPattern() {
139139
assertTrue(page.content().contains("index-no-hello"), page.content());
140140

141141
page.navigate(server.PREFIX + "/index1hello");
142-
assertTrue(page.content().contains("intercepted any character"), page.content());
142+
assertFalse(page.content().contains("intercepted any character"), page.content());
143143

144144
page.navigate(server.PREFIX + "/index123hello");
145145
assertTrue(page.content().contains("index123hello"), page.content());

playwright/src/test/java/com/microsoft/playwright/TestPageSetInputFiles.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void shouldUploadMultipleLargeFiles(@TempDir Path tmpDir) throws IOException, Ex
123123
}
124124
FileChooser fileChooser = page.waitForFileChooser(() -> input.click());
125125
fileChooser.setFiles(uploadFiles.toArray(new Path[0]));
126-
Object filesLen = page.getByRole(AriaRole.TEXTBOX).evaluate("e => e.files.length");
126+
Object filesLen = page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Choose File")).evaluate("e => e.files.length");
127127
assertTrue(fileChooser.isMultiple());
128128
assertEquals(filesCount, filesLen);
129129
}

0 commit comments

Comments
 (0)