-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Bug]: Fixture array parameter error #32275
Comments
Hi there! Passing an array is a common footgun that others have seen before - #32033 is a similar report. We added a note about this to the docs just yesterday, so they're not yet live. But you can take a look here: https://github.com/microsoft/playwright/pull/32261/files#diff-39680f5caa0a24f2a0eaa7c7313f170b4e2d2e15d451d4d47f026bfea933b57fR554 Let me know if that solves it for you! |
Hi @Skn0tt ! Indeed wrapping the input array in another array is a feasible workaround, I can confirm this. (also wrapping the array in an object seems to work just fine) |
Why it was not listed as a breaking change anywhere in the release notes? I'm upgrading from 1.45 to 1.48.2 and spent like half a day figuring out why |
Version
1.46.1
Steps to reproduce
poc.ts:
playwright.config.ts:
Expected behavior
The test passes, as the passed data fixture parameter is an array
Actual behavior
The test fails in the fixture o nthe parameter validation, as data has no
length
property - in fact it is the first element of the array passed in inuse
Additional context
Works fine with 1.45.3
Environment
The text was updated successfully, but these errors were encountered: