diff --git a/site/gatsby-site/playwright/e2e-full/apps/incidents.spec.ts b/site/gatsby-site/playwright/e2e-full/apps/incidents.spec.ts index e657a2712d..930a25ffdb 100644 --- a/site/gatsby-site/playwright/e2e-full/apps/incidents.spec.ts +++ b/site/gatsby-site/playwright/e2e-full/apps/incidents.spec.ts @@ -262,7 +262,7 @@ test.describe('Incidents App', () => { await page.locator('[data-cy="table-view"] button:has-text("Issue Reports")').click(); await page.waitForSelector('[data-cy="row"]'); - await expect(page.locator('[data-cy="row"]')).toHaveCount(1); + await expect(page.locator('[data-cy="row"]')).toHaveCount(2); const firstRowLink = await page.locator('[data-cy="row"] td a').first().getAttribute('href'); expect(firstRowLink).toMatch(/^\/reports\/\d+$/); diff --git a/site/gatsby-site/playwright/e2e-full/incidents/new.spec.ts b/site/gatsby-site/playwright/e2e-full/incidents/new.spec.ts index c4840b6c44..79f5e3e2e8 100644 --- a/site/gatsby-site/playwright/e2e-full/incidents/new.spec.ts +++ b/site/gatsby-site/playwright/e2e-full/incidents/new.spec.ts @@ -10,7 +10,13 @@ test.describe('New Incident page', () => { test('Should successfully create a new incident', async ({ page, login }) => { - await init(); + await init({ + customData: { + users: [ + { userId: 'johndoe', first_name: 'John', last_name: 'Doe', roles: ['admin'] }, + ] + } + }); await login(process.env.E2E_ADMIN_USERNAME, process.env.E2E_ADMIN_PASSWORD, { customData: { roles: ['admin'], first_name: 'John', last_name: 'Doe' } }); @@ -39,7 +45,7 @@ test.describe('New Incident page', () => { await page.getByText('Save').click(); - await page.getByText(`You have successfully create Incident 4. View incident`).waitFor(); + await page.getByText(`You have successfully create Incident 5. View incident`).waitFor(); }); test('Should clone an incident', async ({ page, login }) => { @@ -48,7 +54,7 @@ test.describe('New Incident page', () => { await login(process.env.E2E_ADMIN_USERNAME, process.env.E2E_ADMIN_PASSWORD, { customData: { roles: ['admin'], first_name: 'John', last_name: 'Doe' } }); - const newIncidentId = 4; + const newIncidentId = 5; await page.goto(`${url}/?incident_id=3`);