fix flaky version mismatch warning browser test (#5792)

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)
This commit is contained in:
Christian Byrne
2025-09-25 21:15:03 -07:00
committed by GitHub
parent 6a70152220
commit 3ee0d394ca

View File

@@ -106,6 +106,11 @@ test.describe('Version Mismatch Warnings', () => {
const dismissButton = warningToast.getByRole('button', { name: 'Close' }) const dismissButton = warningToast.getByRole('button', { name: 'Close' })
await dismissButton.click() 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 // Reload the page, keeping local storage
await comfyPage.setup({ clearStorage: false }) await comfyPage.setup({ clearStorage: false })