From 015ceb0fbc35e8018043244e3694093ab9b875b6 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Mon, 3 Feb 2025 12:53:51 +0100 Subject: [PATCH] assert that page state continues working --- tests/library/browsercontext-storage-state.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/library/browsercontext-storage-state.spec.ts b/tests/library/browsercontext-storage-state.spec.ts index e923bb9f7e..146c6035b8 100644 --- a/tests/library/browsercontext-storage-state.spec.ts +++ b/tests/library/browsercontext-storage-state.spec.ts @@ -399,4 +399,12 @@ it('should support IndexedDB', async ({ page, contextFactory }) => { const context = await contextFactory({ storageState }); expect(await context.storageState()).toEqual(storageState); + + const recreatedPage = await context.newPage(); + await recreatedPage.goto('https://mdn.github.io/dom-examples/to-do-notifications/'); + await expect(recreatedPage.locator('#task-list')).toMatchAriaSnapshot(` + - list: + - listitem: + - text: /Pet the cat/ + `); });