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

More E2E tests #1

Merged
merged 4 commits into from
Dec 16, 2024
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
235 changes: 0 additions & 235 deletions packages/e2e/test/allure-awesome/base.test.ts

This file was deleted.

45 changes: 45 additions & 0 deletions packages/e2e/test/allure-awesome/reportOptions.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { expect, test } from "@playwright/test";
import { layer } from "allure-js-commons";
import { Stage, Status } from "allure-js-commons";
import { type ReportBootstrap, boostrapReport } from "../utils/index.js";

let bootstrap: ReportBootstrap;

const now = Date.now();
const fixtures = {
testResults: [
{
name: "0 sample passed test",
fullName: "sample.js#0 sample passed test",
status: Status.PASSED,
stage: Stage.FINISHED,
start: now,
stop: now + 1000,
},
],
};

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

test.beforeEach(async () => {
await layer("e2e");
});

test.describe("allure-awesome", () => {
test.describe("report options", () => {
test("report title and page title contain give report name", async ({ page }) => {
bootstrap = await boostrapReport({
reportConfig: {
name: "Sample allure report",
},
testResults: fixtures.testResults,
});
await page.goto(bootstrap.url);

await expect(page.getByTestId("report-title")).toHaveText("Sample allure report");
expect(await page.title()).toBe("Sample allure report");
});
});
});
Loading
Loading