mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
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:
@@ -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 })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user