From 899eaad1b901903fe4f41cf9f1ecc768c19e4641 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Wed, 24 Apr 2024 22:17:48 +0200 Subject: [PATCH] fix manager, employee, admin invite tests --- e2e/organization.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/organization.spec.ts b/e2e/organization.spec.ts index 01754d4c..2027b57d 100644 --- a/e2e/organization.spec.ts +++ b/e2e/organization.spec.ts @@ -22,7 +22,7 @@ test('test that new manager can be invited', async ({ page }) => { const editorId = Math.round(Math.random() * 10000); await page.getByLabel('Email').fill(`new+${editorId}@editor.test`); await page.getByRole('button', { name: 'Manager' }).click(); - await page.getByRole('button', { name: 'Add' }).click(); + await page.getByRole('button', { name: 'Add', exact: true }).click(); await page.reload(); await expect(page.getByRole('main')).toContainText( `new+${editorId}@editor.test` @@ -34,7 +34,7 @@ test('test that new employee can be invited', async ({ page }) => { const editorId = Math.round(Math.random() * 10000); await page.getByLabel('Email').fill(`new+${editorId}@editor.test`); await page.getByRole('button', { name: 'Employee' }).click(); - await page.getByRole('button', { name: 'Add' }).click(); + await page.getByRole('button', { name: 'Add', exact: true }).click(); await page.reload(); await expect(page.getByRole('main')).toContainText( `new+${editorId}@editor.test` @@ -46,7 +46,7 @@ test('test that new admin can be invited', async ({ page }) => { const adminId = Math.round(Math.random() * 10000); await page.getByLabel('Email').fill(`new+${adminId}@admin.test`); await page.getByRole('button', { name: 'Administrator' }).click(); - await page.getByRole('button', { name: 'Add' }).click(); + await page.getByRole('button', { name: 'Add', exact: true }).click(); await page.reload(); await expect(page.getByRole('main')).toContainText( `new+${adminId}@admin.test` @@ -57,7 +57,7 @@ test('test that error shows if no role is selected', async ({ page }) => { const noRoleId = Math.round(Math.random() * 10000); await page.getByLabel('Email').fill(`new+${noRoleId}@norole.test`); - await page.getByRole('button', { name: 'Add' }).click(); + await page.getByRole('button', { name: 'Add', exact: true }).click(); await expect(page.getByRole('main')).toContainText( 'The role field is required.' );