Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TR-193 E2E tests for rendering links pages correctly #316

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions playwright/e2e/sample-reports-navigation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
cherifGsoul marked this conversation as resolved.
Show resolved Hide resolved
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", () => {
Expand All @@ -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", () => {
Expand All @@ -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()
});

});
});