Skip to content

Commit

Permalink
Support allure metadata in playwright annotations (closes allure-fram…
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Aftakhov committed Jan 14, 2025
1 parent 12c1b02 commit 0fcfab2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/allure-playwright/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ export class AllureReporter implements ReporterV2 {
}

// TODO remove skip and fixme type
const annotations: Label[] = test.annotations?.filter(
(annotation) => annotation.type !== "skip" && annotation.type !== "fixme",
).map((annotation) => ({
name: annotation.type,
value: annotation.description?.startsWith("@") ? annotation.description.substring(1) : annotation.description,
}));
result.labels!.push(...annotations);
if ("annotations" in test) {
const annotations: Label[] = test.annotations?.filter(
(annotation) => annotation.type !== "skip" && annotation.type !== "fixme",
).map((annotation) => ({
name: annotation.type,
value: annotation.description?.startsWith("@") ? annotation.description.substring(1) : annotation.description,
}));
result.labels!.push(...annotations);
}

if (project?.name) {
result.parameters!.push({ name: "Project", value: project.name });
Expand Down

0 comments on commit 0fcfab2

Please sign in to comment.