Commit graph

5 commits

Author SHA1 Message Date
Gusted 94e4f8648b chore: add extra playwright rules 2024-10-23 16:22:25 +02:00
Gusted 0b92d6e0ba
feat: Create temporary user helper function
- Add a helper function that creates and log into a temporary user. So
it doesn't affect other users and tests and the test can more easily be
retried with a 'fresh' state instead of a broken state.
- Adjust the Webauthn test to make use of this.
- Relevant: #5291, #5394
2024-10-19 22:58:32 +02:00
Otto Richter 7765153b40 tests(e2e): Allow tests to run only on file changes
- supports glob patterns in testfiles
- only runs tests on changes
- always runs tests without specified patterns

tests(e2e): refactor global watch patterns

tests(e2e): add watch patterns to test files
2024-10-04 15:14:45 +02:00
Otto Richter 3695f5d096 Parallelize playwright tests
- allow running with multiple workers (tested with up to four workers locally which
  didn't show signs of flakiness)
- prevent race condition with webauthn tests (running them in parallel
  on the same user could prevent another test from logging in)
- fix flakiness on CI action status (Chromium sometimes needs a long
  time to fill the href field, firefox is always faster)

This reverts commit e8585eff5c.
2024-09-11 16:53:51 +02:00
Gusted 63736e8301
[FEAT] Add support for webauthn credential level 3
- For WebAuthn Credential level 3, the `backup_eligible` and
`backup_state` flags are checked if they are consistent with the values
given on login. Forgejo never stored this data, so add a database
migration that makes all webauthn credentials 'legacy' and on the next
first use capture the values of `backup_eligible` and `backup_state`.
As suggested in https://github.com/go-webauthn/webauthn/discussions/219#discussioncomment-10429662
- Adds unit tests.
- Add E2E test.
2024-08-29 10:05:03 +02:00