diff --git a/playwright/e2e/sample-reports-navigation.spec.ts b/playwright/e2e/sample-reports-navigation.spec.ts index c75b1a20..da99febf 100644 --- a/playwright/e2e/sample-reports-navigation.spec.ts +++ b/playwright/e2e/sample-reports-navigation.spec.ts @@ -21,6 +21,26 @@ test.describe("Sample reports navigation", () => { test("URL contains secondaryReportType=status", async ({ page }) => { expect(page.url()).toContain("secondaryReportType=status"); }); + + test("the page contains existing initiatives", async ({ page }) => { + const reportOnBtn = page.locator('select-issue-type').locator('button'); + const reportTypeBtn = page.locator('select-report-type').locator('button'); + await expect(reportOnBtn).toHaveText('Initiatives'); + await expect(reportTypeBtn).toHaveText('Scatter Plot'); + await expect(page.getByText('Track your order maps')).toBeDefined(); + await expect(page.getByText('Favorite sharing')).toBeDefined(); + await expect(page.getByText('Order Playback')).toBeDefined(); + await expect(page.getByText('Social sharing')).toBeDefined(); + }); + + test("the page has status report", async ({ page }) => { + await expect(page.locator("status-report")).toBeVisible(); + await expect(page.locator("status-report").getByText('Track your order maps')).toBeVisible(); + await expect(page.locator("status-report").getByText('Social sharing')).toBeVisible(); + await expect(page.locator("status-report").getByText('QA: Favorite Sharing')).toBeVisible(); + await expect(page.locator("status-report").getByText("QA: Internationalization")).toBeVisible(); + await expect(page.locator("status-report").getByText('Order Playback')).toBeVisible(); + }); }); test.describe("On 'Release timeline with initiative work breakdown' click", () => { @@ -39,6 +59,23 @@ test.describe("Sample reports navigation", () => { test("URL contains secondaryReportType=breakdown", async ({ page }) => { expect(page.url()).toContain("secondaryReportType=breakdown"); }); + + test("the page contains existing initiatives", async ({ page }) => { + const reportOnBtn = page.locator('select-issue-type').locator('button'); + const reportTypeBtn = page.locator('select-report-type').locator('button'); + await expect(reportOnBtn).toHaveText('Initiatives'); + await expect(reportTypeBtn).toHaveText('Gantt Chart'); + await expect(page.locator('gantt-grid')).toBeVisible() + }); + + test("the page has status report", async ({ page }) => { + await expect(page.locator("status-report")).toBeVisible(); + await expect(page.locator("status-report").getByText('Track your order maps')).toBeVisible(); + await expect(page.locator("status-report").getByText('Social sharing')).toBeVisible(); + await expect(page.locator("status-report").getByText('QA: Favorite Sharing')).toBeVisible(); + await expect(page.locator("status-report").getByText("QA: Internationalization")).toBeVisible(); + await expect(page.locator("status-report").getByText('Order Playback')).toBeVisible(); + }) }); test.describe("On 'Ready and in-development initiative work breakdown' click", () => { @@ -61,5 +98,14 @@ test.describe("Sample reports navigation", () => { test("URL contains primaryReportBreakdown=true", async ({ page }) => { expect(page.url()).toContain("primaryReportBreakdown=true"); }); + + test("the page contains existing initiatives", async ({ page }) => { + const reportOnBtn = page.locator('select-issue-type').locator('button'); + const reportTypeBtn = page.locator('select-report-type').locator('button'); + await expect(reportOnBtn).toHaveText('Initiatives'); + await expect(reportTypeBtn).toHaveText('Gantt Chart'); + await expect(page.locator('gantt-grid')).toBeVisible() + }); + }); });