test
/ it
, and describe
should follow the same pattern as @playwright/test
for test context extensions
#1660
Closed
4 tasks done
Labels
Milestone
Clear and concise description of the problem
As a developer I'd love if the API for test context (fixtures) mirrored that of playwright test
This would be better for the following reasons:
beforeEach
before a test to modify its context. You could easily share customizedtest
/describe
and/orit
blocks. UsingbeforeEach
is clunky and not easily sharable.Suggested solution
Allow for test context to be set on the test function level, via
test
/it
, and/ordescribe
. e.g.Alternative
No response
Additional context
This is largely brought about because on my team of 24+ engineers we would like to be able to have standard patterns for faking data. One of the requirements when it comes to sharing API data is having fake datasets that can be re-used for testing and tested against schema so that can test that our validators work correctly. Its also the same fake data factory datasets used for our API test responses, and for data transformers, among other things. We really started to scale the
@playwright/test
approach well and our team is finding this API to be rather clunky by comparison, and having to declare a module augmentation adds more overhead and is prone to error.Validations
The text was updated successfully, but these errors were encountered: