-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Wrap each cucumber step in test.step
#22
Comments
I like this suggestion! Will check. Answering your questions:
Relates to #9 |
Playwright's html report when wrapping with test.describe("Playwright site", () => {
test("Check title", async ({ Given, When, Then }) => {
await test.step("Given I open url \"https://playwright.dev\"", () => Given("I open url \"https://playwright.dev\""));
await test.step("When I click link \"Get started\"", () => When("I click link \"Get started\""));
await test.step("Then I see in title \"Playwright\"", () => Then("I see in title \"Playwright\""));
});
}); |
Sorry to rush, but any chance to push/merge that one 🙏 Will have a demo in a week and wanted to show some nice bdd reporting📈 |
Yes, you will show it. Hoping to release v3 until end of this week. |
Hello,
I would like to combine using playwright-bdd with allure-playwright. The latter one allows to generate rich HTML reports of test runs. However, instead of showing details of execution with low-level playwright API steps, I would like it to show details in the form cucumber feature steps.
Right now, if I set
details: false
in allure-playwright, nothing is shown.It's caused by the fact, that with
details: false
it only shows steps defined with test.step function.Generated test file:
And if I wrap each cucumber step with
test.step
everything looks great in allure report:
So my questions are:
test.step
during test generation?Actually, if I understand the source code correctly and if it makes sense to always define playwright step, then maybe it could be changed directly on fixture level, somwhere inside src/run/invoke.ts:L6-L14
The text was updated successfully, but these errors were encountered: