You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I know, this proejct is in its early phase, but it would be nice if you will have a look on the following issue:
When using a beforeEach like this:
test.describe("foo",()=>{test.beforeEach(async({ page })=>{awaittest.step("Do this first",async()=>{//I let test already fail here...});});test("And then do this",async({
page,},testInfo)=>{testInfo.annotations.push({type: "test_key",description: "Ticket-xxx"});// ... so that this part will not be executed.});
Then no test_key property will be provided in the report.
My current workaround is as follows:
test.describe("foo",()=>{test.beforeEach(async({ page },testInfo)=>{testInfo.annotations.push({type: "test_key",description: "TICKET-PLACEHOLDER",});awaittest.step("Do this first",async()=>{//I let test already fail here...});});
and then use a script to edit the report retroactively, so:
I don't know how to overcome this.. it's a consequence of the fact that we cannot add tags in Playwright in a clean way, unless we add them in the test title itself which IMO is messy. Other frameworks suffer also from this.
Adding the annotations on a beforeEach should work but even that is not very clean.
On the workaround you shared, Im not sure why you need to edit the report retroactively.. aren't the properties filled by the reporter?
Hello!
I know, this proejct is in its early phase, but it would be nice if you will have a look on the following issue:
When using a beforeEach like this:
Then no test_key property will be provided in the report.
My current workaround is as follows:
and then use a script to edit the report retroactively, so:
Not nice, but sufficient.
Maybe there is a programmatic solution that could be provided by you?
The text was updated successfully, but these errors were encountered: