playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature]: Add a parameter in the `test.step()` method to hide code in report

Open Sedatyf opened this issue 1 year ago • 20 comments

🚀 Feature Request

I just discovered the test.step feature. It's really nice and helps me having a nice and tidy report. Unfortunately, every test.step() even the one in Typescript decorator are showing code snippets. This results in a weird and messy report at the end. I'm suggesting to add a parameter whether to decide if we want it or not in the HTML report. Or disable the code snippets for test.step by default

Example

This example show the wrong behavior. The right example would be just a dropdown with the step name in it Image

Motivation

I think test.step is a great feature for keeping an HTML report tidy, without using any BDD/Cucumber methods in the project. But with the code displayed, it looks a bit complicated and unreadable, which defeats the whole purpose of the feature.

Sedatyf avatar Dec 17 '24 15:12 Sedatyf