Skip to content

Commit

Permalink
fix manager, employee, admin invite tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Onatcer committed Apr 24, 2024
1 parent f52a629 commit 899eaad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/organization.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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.'
);
Expand Down

0 comments on commit 899eaad

Please sign in to comment.