Skip to content

Commit afa61e8

Browse files
committed
fix flaky test
1 parent 4443d27 commit afa61e8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,19 @@ void shouldSerialiseStorageStateWithLoneSurrogates() {
174174
@Test
175175
void shouldSupportIndexedDB() {
176176
page.navigate(server.PREFIX + "/to-do-notifications/index.html");
177+
178+
assertThat(page.locator("#notifications")).matchesAriaSnapshot(
179+
" - list:\n" +
180+
" - listitem: Database initialised."
181+
);
177182
page.locator("label:has-text('Task title')").fill("Pet the cat");
178183
page.locator("label:has-text('Hours')").fill("1");
179184
page.locator("label:has-text('Mins')").fill("1");
180185
page.locator("text=Add Task").click();
186+
assertThat(page.locator("#notifications")).matchesAriaSnapshot(
187+
" - list:\n" +
188+
" - listitem: \"Transaction completed: database modification finished.\""
189+
);
181190

182191
String storageState = page.context().storageState(new BrowserContext.StorageStateOptions().setIndexedDB(true));
183192
assertJsonEquals("{\"cookies\":[],\"origins\":[\n" +

0 commit comments

Comments
 (0)