From 3ee0d394ca8445d68a62b455b407e5dcc2a8ed00 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 25 Sep 2025 21:15:03 -0700 Subject: [PATCH] fix flaky version mismatch warning browser test (#5792) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a wait to ensure the dismissed state is saved to localstorage properly before `setup` (page reload). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5792-fix-broken-test-27a6d73d365081e69c1febbc246448fa) by [Unito](https://www.unito.io) --- browser_tests/tests/versionMismatchWarnings.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/browser_tests/tests/versionMismatchWarnings.spec.ts b/browser_tests/tests/versionMismatchWarnings.spec.ts index b2c62aeb0..eee6fda92 100644 --- a/browser_tests/tests/versionMismatchWarnings.spec.ts +++ b/browser_tests/tests/versionMismatchWarnings.spec.ts @@ -106,6 +106,11 @@ test.describe('Version Mismatch Warnings', () => { const dismissButton = warningToast.getByRole('button', { name: 'Close' }) await dismissButton.click() + // Wait for the dismissed state to be persisted + await comfyPage.page.waitForFunction( + () => !!localStorage.getItem('comfy.versionMismatch.dismissals') + ) + // Reload the page, keeping local storage await comfyPage.setup({ clearStorage: false })