forked from allure-framework/allure-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(allure-playwright): support skip and fixme annotations (voa allu…
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { expect, it } from "vitest"; | ||
import { runPlaywrightInlineTest } from "../utils.js"; | ||
|
||
it("should support skip annotation", async () => { | ||
const { tests } = await runPlaywrightInlineTest({ | ||
"sample.test.js": ` | ||
import { test } from '@playwright/test'; | ||
test('test full report', { | ||
annotation: { | ||
type: "skip", | ||
description: "skipped via skip annotation", | ||
}, | ||
}, async () => { | ||
}); | ||
`, | ||
}); | ||
|
||
expect(tests).toEqual( | ||
expect.arrayContaining([ | ||
expect.objectContaining({ | ||
name: "test full report", | ||
status: "skipped", | ||
statusDetails: expect.objectContaining({ | ||
message: "skipped via skip annotation", | ||
}), | ||
}), | ||
]), | ||
); | ||
}); | ||
|
||
it("should support fixme annotation", async () => { | ||
const { tests } = await runPlaywrightInlineTest({ | ||
"sample.test.js": ` | ||
import { test } from '@playwright/test'; | ||
test('test full report', { | ||
annotation: { | ||
type: "fixme", | ||
description: "skipped via fixme annotation", | ||
}, | ||
}, async () => { | ||
}); | ||
`, | ||
}); | ||
|
||
expect(tests).toEqual( | ||
expect.arrayContaining([ | ||
expect.objectContaining({ | ||
name: "test full report", | ||
status: "skipped", | ||
statusDetails: expect.objectContaining({ | ||
message: "skipped via fixme annotation", | ||
}), | ||
}), | ||
]), | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters