-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add faircalendar e2e test, fix calendar caching
- Loading branch information
1 parent
86cd179
commit 4edc1ad
Showing
4 changed files
with
90 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// @ts-check | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('auth required', async ({ page }) => { | ||
await page.goto('/app/faircalendar'); | ||
await page.waitForURL(url => url.pathname.startsWith('/login')); | ||
}); | ||
|
||
test.describe.only('authenticated', () => { | ||
test.use({ storageState: 'playwright/.auth/johnDoe.json' }); | ||
|
||
test('faircalendar content', async ({ page }) => { | ||
await page.goto('/app/faircalendar?year=2023&month=10'); // month=0..11 | ||
await expect(page).toHaveTitle('FairCalendar novembre 2023 - Permacoop'); | ||
|
||
const calendar = page.getByTestId('pc-event-calendar'); | ||
await expect(calendar).toBeVisible(); | ||
|
||
const toussaint = calendar.getByText('7h - Jour férié'); | ||
await expect(toussaint).toBeVisible(); | ||
}); | ||
|
||
test('add event', async ({ page }) => { | ||
await page.goto('/app/faircalendar?year=2023&month=10'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters