Skip to content
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

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

Open
Sedatyf opened this issue Dec 17, 2024 · 2 comments
Open

Comments

@Sedatyf
Copy link

Sedatyf commented Dec 17, 2024

🚀 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.

@vitalets
Copy link
Contributor

@pavelfeldman What if allow passing location: null to test.step() and then don't render the code snippet?

await test.step('launch browser', () => {
  // ...
}, { location: null });

@ZDGN-for-Git
Copy link

Totally agree with @Sedatyf.
Do like this feature for my reports but what a mess to have the code detail.
May we have at least a reporter option to deactivate ✂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants