Enhance guests tests
Some checks failed
Add copyright notice / copyright_notice (pull_request) Successful in 3m38s
Check usage of free licenses / build-static-assets (pull_request) Successful in 3m53s
Build Nginx-based docker image / build-static-assets (push) Successful in 20m22s
Playwright Tests / test (pull_request) Failing after 23m25s

This commit is contained in:
Manuel Bustillo 2025-06-01 22:50:41 +02:00
parent 15ccccd927
commit 19232477fd

View File

@ -67,19 +67,25 @@ test('should display the list of guests', async ({ page }) => {
await page.goto('/default/dashboard/guests'); await page.goto('/default/dashboard/guests');
await expect(page.getByRole('tab', { name: 'Groups' })).toBeVisible(); await expect(page.getByRole('button', { name: 'Add new' })).toBeVisible();
await expect(page.getByRole('tab', { name: 'Guests' })).toBeVisible(); await expect(page.getByRole('tab', { name: 'Guests' })).toBeVisible();
await expect(page.getByRole('tab', { name: 'Groups' })).toBeVisible();
await expect(page.getByRole('tab', { name: 'Invitations' })).toBeVisible();
await expect(page.getByText('There are 2 elements in the list')).toBeVisible(); await expect(page.getByText('There are 2 elements in the list')).toBeVisible();
await expect(page.getByRole('row')).toHaveCount(3); // 1 header row + 2 data rows
await expect(page.getByRole('row').nth(1).getByRole('cell', { name: 'Kristofer Rohan DVM' })).toBeVisible(); await expect(page.getByRole('row').nth(1).getByRole('cell', { name: 'Kristofer Rohan DVM' })).toBeVisible();
await expect(page.getByRole('row').nth(1).getByRole('cell', { name: 'Childhood friends' })).toBeVisible(); await expect(page.getByRole('row').nth(1).getByRole('cell', { name: 'Childhood friends' })).toBeVisible();
await expect(page.getByRole('row').nth(1).getByRole('cell', { name: 'Tentative' })).toBeVisible(); await expect(page.getByRole('row').nth(1).getByRole('cell', { name: 'Tentative' })).toBeVisible();
await expect(page.getByRole('row').nth(1).locator('svg')).toHaveCount(2);
await expect(page.getByRole('row').nth(2).getByRole('cell', { name: 'Olevia Quigley Jr.' })).toBeVisible(); await expect(page.getByRole('row').nth(2).getByRole('cell', { name: 'Olevia Quigley Jr.' })).toBeVisible();
await expect(page.getByRole('row').nth(2).getByRole('cell', { name: 'Work' })).toBeVisible(); await expect(page.getByRole('row').nth(2).getByRole('cell', { name: 'Work' })).toBeVisible();
await expect(page.getByRole('row').nth(2).getByRole('cell', { name: 'Invited' })).toBeVisible(); await expect(page.getByRole('row').nth(2).getByRole('cell', { name: 'Invited' })).toBeVisible();
await expect(page.getByRole('row').nth(2).locator('svg')).toHaveCount(2);
}); });
test('should display the list of groups', async ({ page }) => { test('should display the list of groups', async ({ page }) => {