import { expect, resetDatabase, signIn, test } from './fixtures'; test.beforeEach(async () => { await resetDatabase(); }); test('the panel can be previewed at a future moment', async ({ page }) => { await signIn(page, 'admin'); await page.goto('/admin'); const preview = page.getByRole('img', { name: /Aperçu de l’écran/ }); await expect(preview).toBeVisible(); // The question the shop asks before a holiday is "what will the window say // while I'm away?" — which is worth answering before someone is standing in // front of a locked door. await page.getByRole('button', { name: 'Demain 10:00' }).click(); await expect(preview).toHaveAttribute('src', /at=/); await expect(page.getByText(/Projection/)).toBeVisible(); await page.getByRole('button', { name: 'Revenir à maintenant' }).click(); await expect(preview).not.toHaveAttribute('src', /at=/); });