diff --git a/e2e/organization.spec.ts b/e2e/organization.spec.ts index 2027b57d..bd63409c 100644 --- a/e2e/organization.spec.ts +++ b/e2e/organization.spec.ts @@ -22,11 +22,12 @@ 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', exact: true }).click(); - await page.reload(); - await expect(page.getByRole('main')).toContainText( - `new+${editorId}@editor.test` - ); + await Promise.all([ + page.getByRole('button', { name: 'Add', exact: true }).click(), + expect(page.getByRole('main')).toContainText( + `new+${editorId}@editor.test` + ), + ]); }); test('test that new employee can be invited', async ({ page }) => { @@ -34,11 +35,12 @@ 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', exact: true }).click(); - await page.reload(); - await expect(page.getByRole('main')).toContainText( - `new+${editorId}@editor.test` - ); + await Promise.all([ + page.getByRole('button', { name: 'Add', exact: true }).click(), + await expect(page.getByRole('main')).toContainText( + `new+${editorId}@editor.test` + ), + ]); }); test('test that new admin can be invited', async ({ page }) => { @@ -46,21 +48,24 @@ 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', exact: true }).click(); - await page.reload(); - await expect(page.getByRole('main')).toContainText( - `new+${adminId}@admin.test` - ); + await Promise.all([ + page.getByRole('button', { name: 'Add', exact: true }).click(), + expect(page.getByRole('main')).toContainText( + `new+${adminId}@admin.test` + ), + ]); }); test('test that error shows if no role is selected', async ({ page }) => { await goToOrganizationSettings(page); const noRoleId = Math.round(Math.random() * 10000); await page.getByLabel('Email').fill(`new+${noRoleId}@norole.test`); - await page.getByRole('button', { name: 'Add', exact: true }).click(); - await expect(page.getByRole('main')).toContainText( - 'The role field is required.' - ); + await Promise.all([ + page.getByRole('button', { name: 'Add', exact: true }).click(), + expect(page.getByRole('main')).toContainText( + 'The role field is required.' + ), + ]); }); // TODO: Add Test for import diff --git a/resources/js/Components/Common/DatePicker.vue b/resources/js/Components/Common/DatePicker.vue index e1eddd3e..b24b4565 100644 --- a/resources/js/Components/Common/DatePicker.vue +++ b/resources/js/Components/Common/DatePicker.vue @@ -1,5 +1,5 @@