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
{{ message }}
Repository navigation
[Feature]: Make setBoxedStackPrefixes official #38818
Hello! After some digging I found boxedStackPrefixes is responsible for not showing certain files in HTML output, traces etc. We have some library code that wraps waitFor to add some extra wait conditions that are specific to our app. In order to not have 90% of the wait expressions have the same line in the HTML output (callWaitFor(...args) sort of thing), we're using
Simon Knott (@Skn0tt) ah I didn't know about that feature. It looks helpful but requires using test.step, so not exactly the same thing as what we're doing right now. Maybe with some refactoring it could be made to work, but the setBoxStackPrefix function is just what we want and already exists. Any reason not to add types/docs?
I'll try it. I am thinking we might run in to trouble because what we're really doing is hooking into waitFor and similar methods on the Locator prototype to wait for any loading UI to disappear. This has been greeat for us because it lets us have extremely aggressive timeouts, and only allow for >1s for things to appear when there's a spinner or similar (which incentivises us to improve the product by showing "pending" UI when appropriate to make playwright tests pass reliably).
But there are quite a few hacks - and it may not be possible to shove test.step in the middle of them. I'll have a try though.
Activity
Skn0tt commentedon Jan 19, 2026
Hi! Have you tried using boxed steps or boxed fixtures instead?
mmkal commentedon Jan 28, 2026
Simon Knott (@Skn0tt) ah I didn't know about that feature. It looks helpful but requires using test.step, so not exactly the same thing as what we're doing right now. Maybe with some refactoring it could be made to work, but the setBoxStackPrefix function is just what we want and already exists. Any reason not to add types/docs?
Skn0tt commentedon Jan 28, 2026
It's an implementation detail and not meant for public usage. Give
test.stepa shot!mmkal commentedon Jan 28, 2026
I'll try it. I am thinking we might run in to trouble because what we're really doing is hooking into
waitForand similar methods on the Locator prototype to wait for any loading UI to disappear. This has been greeat for us because it lets us have extremely aggressive timeouts, and only allow for >1s for things to appear when there's a spinner or similar (which incentivises us to improve the product by showing "pending" UI when appropriate to make playwright tests pass reliably).But there are quite a few hacks - and it may not be possible to shove
test.stepin the middle of them. I'll have a try though.