We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With the come of team rights policies, there are a lot of almost indentical tests that should be run for some routes.
Parametrize tests that test team rights - make use of the test.each method to stuff similar test to one pack.
test.each
You can peek into the note.settings.test.ts to understand how it should be done.
note.settings.test.ts
Also, it would be nice to save this test.each as separate util for better convenience: something like
test.roles = test.each([{ role: MemberRole.Read, isPublic: false, isAuthorized: true, statusCode: 200 }, { ... }, { ... }, { ... } ]);
and use it as
test.roles('Returns note with access rights by public id ....', ({ role, isPublic, isAuthorized, statusCode }) => {
})
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
With the come of team rights policies, there are a lot of almost indentical tests that should be run for some routes.
Solution
Parametrize tests that test team rights - make use of the
test.each
method to stuff similar test to one pack.You can peek into the
note.settings.test.ts
to understand how it should be done.Also, it would be nice to save this
test.each
as separate util for better convenience:something like
and use it as
})
Tasks
The text was updated successfully, but these errors were encountered: