Fix minor UI bugs and test guest CRUD #281

Merged
bustikiller merged 2 commits from improve-specs-guests into main 2025-06-14 06:35:14 +00:00
Showing only changes of commit 5c524c2559 - Show all commits

View File

@ -81,8 +81,10 @@ const mockGroupsAPI = ({ page }: { page: Page }) => {
})
}
test('should display the list of guests', async ({ page }) => {
test('should allow CRUD on guests', async ({ page }) => {
await mockGuestsAPI({ page });
await mockGroupsAPI({ page });
await page.goto('/default/dashboard/guests');
@ -105,14 +107,7 @@ test('should display the list of guests', async ({ page }) => {
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 allow creating a new guest', async ({ page }) => {
await mockGuestsAPI({ page });
await mockGroupsAPI({ page });
await page.goto('/default/dashboard/guests');
await expect(page.getByText('There are 2 elements in the list')).toBeVisible();
await page.getByRole('button', { name: 'Add new' }).click();
await page.getByRole('dialog').getByLabel('Name').fill('John Snow');