-
Notifications
You must be signed in to change notification settings - Fork 0
fix(desktop): fix Windows FUSE overwrite race and bin E2E test #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5cbd784
49ef139
aea4e31
29fe7aa
94838ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,6 +38,20 @@ test.describe.serial('Recycle Bin', () => { | |||||
| // Unique suffix per test run to avoid naming collisions | ||||||
| const runId = Date.now().toString(); | ||||||
|
|
||||||
| /** Best-effort Zustand quota store accessor (returns null if store not exposed). */ | ||||||
| type QuotaStore = { getState: () => { usedBytes: number } }; | ||||||
| const getQuotaUsedBytes = (p: Page) => | ||||||
| p.evaluate(() => { | ||||||
| try { | ||||||
| const store = (window as unknown as Record<string, Record<string, QuotaStore> | undefined>) | ||||||
| .__ZUSTAND_STORES__?.quota; | ||||||
| if (!store) return null; | ||||||
| return store.getState().usedBytes as number; | ||||||
| } catch { | ||||||
| return null; | ||||||
| } | ||||||
| }); | ||||||
|
|
||||||
| test.beforeAll(async ({ browser: testBrowser }) => { | ||||||
| browser = testBrowser; | ||||||
| context = await browser.newContext(); | ||||||
|
|
@@ -350,20 +364,10 @@ test.describe.serial('Recycle Bin', () => { | |||||
| // SECONDARY ASSERTION (best-effort): check quota via Zustand store if accessible | ||||||
| // This is fragile because window.__ZUSTAND_STORES__ may not be exposed. | ||||||
| // The primary value of this test is proving permanent delete doesn't crash. | ||||||
| const quotaDecreased = await page.evaluate(() => { | ||||||
| try { | ||||||
| const store = (window as any).__ZUSTAND_STORES__?.quota; | ||||||
| if (!store) return null; // Store not accessible, skip | ||||||
| // Just verify store is functional (not crashed) | ||||||
| const state = store.getState(); | ||||||
| return typeof state.usedBytes === 'number'; | ||||||
| } catch { | ||||||
| return null; | ||||||
| } | ||||||
| }); | ||||||
| const quotaUsed = await getQuotaUsedBytes(page); | ||||||
| // Only assert if store was accessible -- null means we couldn't check | ||||||
| if (quotaDecreased !== null) { | ||||||
| expect(quotaDecreased).toBe(true); | ||||||
| if (quotaUsed !== null) { | ||||||
| expect(typeof quotaUsed === 'number').toBe(true); | ||||||
|
||||||
| expect(typeof quotaUsed === 'number').toBe(true); | |
| expect(quotaUsed).toBeGreaterThanOrEqual(0); |
Uh oh!
There was an error while loading. Please reload this page.