Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/projection/web.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,11 +957,15 @@ test('hidden notification invalidates delayed cover and updates cannot resurrect
const w = window as any;
w.holdCover = true;
w.eventListeners.transitionStarted({ id: 'counter' });
});
expect(await page.evaluate(() => (window as any).coverReplies.length)).toBe(1);
await page.evaluate(() => {
const w = window as any;
w.eventListeners.hidden({ id: 'counter' });
w.coverReplies.splice(0).forEach((resolve: (value: { shown: boolean }) => void) => resolve({ shown: true }));
w.coverReplies.shift()({ shown: true });
w.eventListeners.setColors({ id: 'counter' });
});
await page.waitForTimeout(100);
await page.evaluate(() => new Promise<void>((resolve) => requestAnimationFrame(() => requestAnimationFrame(() => resolve()))));
await expect(page.locator('#source')).not.toHaveAttribute('data-native-ui-snapshot-visible');
expect(await page.evaluate(() => (window as any).calls.filter((call: any) => call.action === 'prepare').length)).toBe(1);
await page.evaluate(() => (window as any).eventListeners.shown({ id: 'counter' }));
Expand Down
Loading