Skip to content

Commit 3ee0d39

Browse files
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)
1 parent 6a70152 commit 3ee0d39

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

browser_tests/tests/versionMismatchWarnings.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ test.describe('Version Mismatch Warnings', () => {
106106
const dismissButton = warningToast.getByRole('button', { name: 'Close' })
107107
await dismissButton.click()
108108

109+
// Wait for the dismissed state to be persisted
110+
await comfyPage.page.waitForFunction(
111+
() => !!localStorage.getItem('comfy.versionMismatch.dismissals')
112+
)
113+
109114
// Reload the page, keeping local storage
110115
await comfyPage.setup({ clearStorage: false })
111116

0 commit comments

Comments
 (0)