make sure e2e tests use the visible timer button only

This commit is contained in:
Gregor Vostrak
2026-02-12 17:43:04 +01:00
parent 0e63ecb520
commit 38457cae4d
5 changed files with 43 additions and 13 deletions

View File

@@ -31,15 +31,21 @@ async function selectCommand(page: Page, name: string) {
}
async function assertTimerIsRunning(page: Page) {
await expect(page.locator(TIMER_BUTTON_SELECTOR)).toHaveClass(/bg-red-400\/80/, {
timeout: 10000,
});
await expect(page.locator(TIMER_BUTTON_SELECTOR).and(page.locator(':visible'))).toHaveClass(
/bg-red-400\/80/,
{
timeout: 10000,
}
);
}
async function assertTimerIsStopped(page: Page) {
await expect(page.locator(TIMER_BUTTON_SELECTOR)).toHaveClass(/bg-accent-300\/70/, {
timeout: 10000,
});
await expect(page.locator(TIMER_BUTTON_SELECTOR).and(page.locator(':visible'))).toHaveClass(
/bg-accent-300\/70/,
{
timeout: 10000,
}
);
}
test.describe('Command Palette', () => {