diff --git a/tests/guests.spec.ts b/tests/guests.spec.ts index e7a6138..ca63543 100644 --- a/tests/guests.spec.ts +++ b/tests/guests.spec.ts @@ -67,19 +67,25 @@ test('should display the list of guests', async ({ page }) => { 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: '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.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: 'Childhood friends' })).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: 'Work' })).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 }) => {