Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
]
},
"resolutions": {
"@preact/signals": "^2.5.1",
"@preact/compat": "^18.3.1",
"@preact/signals": "^2.5.1",
"backbone.marionette@npm:3.5.1/backbone": "^1.6.0",
"backbone.marionette@npm:3.5.1/underscore": "^1.13.6",
"braces": "^3.0.3",
Expand Down
28 changes: 22 additions & 6 deletions packages/e2e/test/allure-awesome/features/flaky.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ test.describe("flaky", () => {
await label("env", browserName);

treePage = new TreePage(page);

await page.goto(bootstrap.url);
});

test.afterAll(async () => {
await bootstrap?.shutdown?.();
});

test("should be able to filter flaky tests with flaky status using flaky filter", async () => {
test("should be able to filter flaky tests with flaky status using flaky filter", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(2);
await treePage.toggleFlakyFilter();
await expect(treePage.leafLocator).toHaveCount(1);
Expand All @@ -114,25 +114,41 @@ test.describe("flaky", () => {
await expect(treePage.leafLocator).toHaveCount(2);
});

test("should show flaky icon only for flaky tests in the tree", async () => {
test("should show flaky icon only for flaky tests in the tree", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.getLeafByTitle(flakyTestName).getByTestId("tree-leaf-flaky")).toBeVisible();
await expect(treePage.getLeafByTitle(nonFlakyTestName).getByTestId("tree-leaf-flaky")).not.toBeVisible();
});

test("metadata shows correct count of flaky tests", async () => {
test("metadata shows correct count of flaky tests", async ({ page }) => {
await page.goto(bootstrap.url);

const total = await treePage.getMetadataValue("total");
const flaky = await treePage.getMetadataValue("flaky");

expect(total).toBe("2");
expect(flaky).toBe("1");
});

test("should show tooltip with flaky filter description on hover", async () => {
test("should show tooltip with flaky filter description on hover", async ({ page }) => {
await page.goto(bootstrap.url);

await treePage.openFilterMenu();
await expect(treePage.flakyFilterLocator).toBeVisible();
await treePage.flakyFilterLocator.hover();
await expect(treePage.filterTooltipLocator).toBeVisible();
await treePage.closeTooltip();
await expect(treePage.filterTooltipLocator).toBeHidden();
});

test("should apply flaky filter to the tree when filter=flaky query parameter is present", async ({ page }) => {
await page.goto(`${bootstrap.url}?filter=flaky`);

await expect(treePage.leafLocator).toHaveCount(1);

await treePage.toggleFlakyFilter();

await expect(treePage.leafLocator).toHaveCount(2);
});
});
28 changes: 22 additions & 6 deletions packages/e2e/test/allure-awesome/features/new.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ test.describe("new tests", () => {
await label("env", browserName);

treePage = new TreePage(page);

await page.goto(bootstrap.url);
});

test.afterAll(async () => {
await bootstrap?.shutdown?.();
});

test("should be able to filter new tests with using new filter", async () => {
test("should be able to filter new tests with using new filter", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(3);

// Select filter by new status
Expand All @@ -93,7 +93,9 @@ test.describe("new tests", () => {
await expect(treePage.leafLocator).toHaveCount(3);
});

test("should show new icon only for new tests in the tree", async () => {
test("should show new icon only for new tests in the tree", async ({ page }) => {
await page.goto(bootstrap.url);

// Classic new test
await expect(treePage.getLeafByTitle(passedTestName).getByTestId("tree-leaf-transition-new")).toBeVisible();
await expect(treePage.getLeafByTitle(failedTestName).getByTestId("tree-leaf-transition-new")).toBeVisible();
Expand All @@ -102,20 +104,34 @@ test.describe("new tests", () => {
await expect(treePage.getLeafByTitle(ordinaryTestName).getByTestId("tree-leaf-transition-new")).not.toBeVisible();
});

test("metadata shows correct count of new tests", async () => {
test("metadata shows correct count of new tests", async ({ page }) => {
await page.goto(bootstrap.url);

const total = await treePage.getMetadataValue("total");
const newCount = await treePage.getMetadataValue("new");

expect(total).toBe("3");
expect(newCount).toBe("2");
});

test("should show tooltip with new filter description on hover", async () => {
test("should show tooltip with new filter description on hover", async ({ page }) => {
await page.goto(bootstrap.url);

await treePage.openFilterMenu();
await expect(treePage.newFilterLocator).toBeVisible();
await treePage.newFilterLocator.hover();
await expect(treePage.filterTooltipLocator).toBeVisible();
await treePage.closeTooltip();
await expect(treePage.filterTooltipLocator).toBeHidden();
});

test("should apply new filter to the tree when filter=new query parameter is present", async ({ page }) => {
await page.goto(`${bootstrap.url}?filter=new`);

await expect(treePage.leafLocator).toHaveCount(2);

await treePage.toggleNewFilter();

await expect(treePage.leafLocator).toHaveCount(3);
});
});
28 changes: 23 additions & 5 deletions packages/e2e/test/allure-awesome/features/retries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ test.describe("retries", () => {
await label("env", browserName);

treePage = new TreePage(page);

await page.goto(bootstrap.url);
});

test.afterAll(async () => {
await bootstrap?.shutdown?.();
});

test("shows only tests with retries", async () => {
test("shows only tests with retries", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(3);
await treePage.toggleRetryFilter();
await expect(treePage.leafLocator).toHaveCount(2);
Expand All @@ -82,6 +82,8 @@ test.describe("retries", () => {
});

test("should show retry icon in the tree for tests with retries", async ({ page }) => {
await page.goto(bootstrap.url);

const retryIcons = page.getByTestId("tree-leaf-retries");

await expect(retryIcons).toHaveCount(2);
Expand All @@ -95,22 +97,38 @@ test.describe("retries", () => {
await expect(anotherTestWithRetriesIcon).toContainText("1");
});

test("metadata shows correct count of retries", async () => {
test("metadata shows correct count of retries", async ({ page }) => {
await page.goto(bootstrap.url);

const total = await treePage.getMetadataValue("total");
const retries = await treePage.getMetadataValue("retries");

expect(total).toBe("3");
expect(retries).toBe("2");
});

test("should show tooltip with retries filter description on hover", async () => {
test("should show tooltip with retries filter description on hover", async ({ page }) => {
await page.goto(bootstrap.url);

await treePage.openFilterMenu();
await expect(treePage.retryFilterLocator).toBeVisible();
await treePage.retryFilterLocator.hover();
await expect(treePage.filterTooltipLocator).toBeVisible();
await treePage.closeTooltip();
await expect(treePage.filterTooltipLocator).toBeHidden();
});

test("should apply regressed filter to the tree when filter=regressed query parameter is present", async ({
page,
}) => {
await page.goto(`${bootstrap.url}?filter=retry`);

await expect(treePage.leafLocator).toHaveCount(2);

await treePage.toggleRetryFilter();

await expect(treePage.leafLocator).toHaveCount(3);
});
});

test.describe("test results", () => {
Expand Down
71 changes: 62 additions & 9 deletions packages/e2e/test/allure-awesome/features/transitions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ test.describe("status transitions", () => {
stage: Stage.FINISHED,
}),
];

const history = makeHistory(8, (index) => ({
name: reportName,
knownTestCaseIds: [newFailedTestTestCaseId, newPassedTestTestCaseId, newBrokenTestTestCaseId],
Expand Down Expand Up @@ -106,15 +105,15 @@ test.describe("status transitions", () => {
await label("env", browserName);

treePage = new TreePage(page);

await page.goto(bootstrap.url);
});

test.afterAll(async () => {
await bootstrap?.shutdown?.();
});

test("should be able to filter fixed tests with using freshely fixed status filter", async () => {
test("should be able to filter fixed tests with using freshely fixed status filter", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(4);

// Select freshely fixed filter
Expand All @@ -136,7 +135,9 @@ test.describe("status transitions", () => {
await expect(treePage.leafLocator).toHaveCount(4);
});

test("should be able to filter regressed tests with using freshely regressed status filter", async () => {
test("should be able to filter regressed tests with using freshely regressed status filter", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(4);

// Select freshely fixed filter
Expand All @@ -158,11 +159,15 @@ test.describe("status transitions", () => {
await expect(treePage.leafLocator).toHaveCount(4);
});

test("should be able to filter malfunctioned tests with using freshely malfunctioned status filter", async () => {
test("should be able to filter malfunctioned tests with using freshely malfunctioned status filter", async ({
page,
}) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(4);

// Select freshely malfunctioned filter
await treePage.toggleMalfuctionedFilter();
await treePage.toggleMalfunctionedFilter();

// Verify only tests with freshely malfunctioned status are visible
await expect(treePage.leafLocator).toHaveCount(1);
Expand All @@ -174,13 +179,15 @@ test.describe("status transitions", () => {
await expect(treePage.getLeafByTitle(newBrokenTestName)).toBeVisible();

// Disable malfunctioned filter
await treePage.toggleMalfuctionedFilter();
await treePage.toggleMalfunctionedFilter();

// Verify all tests are visible again
await expect(treePage.leafLocator).toHaveCount(4);
});

test("should show only one Tooltip and change its content on hover different transitions", async () => {
test("should show only one Tooltip and change its content on hover different transitions", async ({ page }) => {
await page.goto(bootstrap.url);

await expect(treePage.leafLocator).toHaveCount(4);

// Hover on the test with 'new' transition
Expand Down Expand Up @@ -218,4 +225,50 @@ test.describe("status transitions", () => {
await treePage.closeTooltip();
await expect(treePage.leafTransitionTooltipLocator).toBeHidden();
});

test("should apply regressed filter to the tree when filter=regressed query parameter is present", async ({
page,
}) => {
await page.goto(`${bootstrap.url}?filter=regressed`);

await expect(treePage.leafLocator).toHaveCount(1);
await expect(treePage.getLeafByTitle(newTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newPassedTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newFailedTestName)).toBeVisible();
await expect(treePage.getLeafByTitle(newBrokenTestName)).not.toBeVisible();

await treePage.toggleRegressedFilter();

await expect(treePage.leafLocator).toHaveCount(4);
});

test("should apply malfunctioned filter to the tree when filter=malfunctioned query parameter is present", async ({
page,
}) => {
await page.goto(`${bootstrap.url}?filter=malfunctioned`);

await expect(treePage.leafLocator).toHaveCount(1);
await expect(treePage.getLeafByTitle(newTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newPassedTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newFailedTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newBrokenTestName)).toBeVisible();

await treePage.toggleMalfunctionedFilter();

await expect(treePage.leafLocator).toHaveCount(4);
});

test("should apply fixed filter to the tree when filter=fixed query parameter is present", async ({ page }) => {
await page.goto(`${bootstrap.url}?filter=fixed`);

await expect(treePage.leafLocator).toHaveCount(1);
await expect(treePage.getLeafByTitle(newTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newPassedTestName)).toBeVisible();
await expect(treePage.getLeafByTitle(newFailedTestName)).not.toBeVisible();
await expect(treePage.getLeafByTitle(newBrokenTestName)).not.toBeVisible();

await treePage.toggleFixedFilter();

await expect(treePage.leafLocator).toHaveCount(4);
});
});
8 changes: 4 additions & 4 deletions packages/e2e/test/pageObjects/Tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class TreePage extends CommonPage {

fixedFilterLocator: Locator;
regressedFilterLocator: Locator;
malfuctionedFilterLocator: Locator;
malfunctionedFilterLocator: Locator;

filterTooltipLocator: Locator;

Expand Down Expand Up @@ -92,7 +92,7 @@ export class TreePage extends CommonPage {

this.fixedFilterLocator = page.getByTestId("fixed-filter");
this.regressedFilterLocator = page.getByTestId("regressed-filter");
this.malfuctionedFilterLocator = page.getByTestId("malfunctioned-filter");
this.malfunctionedFilterLocator = page.getByTestId("malfunctioned-filter");

this.filterTooltipLocator = page.getByTestId("filter-tooltip");
}
Expand Down Expand Up @@ -279,7 +279,7 @@ export class TreePage extends CommonPage {
await this.toggleFilter(this.regressedFilterLocator);
}

async toggleMalfuctionedFilter() {
await this.toggleFilter(this.malfuctionedFilterLocator);
async toggleMalfunctionedFilter() {
await this.toggleFilter(this.malfunctionedFilterLocator);
}
}
Loading