test: SvelteKit regression tests (Vitest + Playwright + CI) (William punch list #4/#5)#143
Open
codegeek718 wants to merge 1 commit into
Open
test: SvelteKit regression tests (Vitest + Playwright + CI) (William punch list #4/#5)#143codegeek718 wants to merge 1 commit into
codegeek718 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final items on William's punch list — get regression tests working in SvelteKit (#4) and cover the Dashboard's behaviour (#5). Two harnesses:
Ports of the PHP Behat features (
cgmembers/rcredits/rweb/featuresetc.) into TS didn't make sense — different framework, different assumptions. Instead, wrote new tests that exercise the same behaviours the PHP tests presumably guard (auth path, session, redirect on unauth). If William wants a direct port of specific PHP scenarios he can point them out and I'll match one-for-one.What's in this PR
web/package.jsontest,test:unit,test:e2escriptsweb/vitest.config.tstests/e2e/web/playwright.config.tsnpm run build && npm run previewon :4173, retries in CI, keeps traces + screenshots on failureweb/tests/unit/auth.test.tsweb/tests/unit/drupal-password.test.tsweb/tests/unit/rate-limit.test.tsweb/tests/e2e/login.spec.ts/redirects to/loginwhen unauthenticatedweb/tests/README.mdweb/.gitignoretest-results,playwright-report,playwright/.cache.github/workflows/test.ymlWhat's intentionally deferred
The full sign-in round-trip (identifier → PHP
/cgpay-lookup→ password verify → JWT → dashboard render) needs a MariaDB with a known user row plus the PHP SSO backend responding. Both are awkward for CI. That path is smoke-tested manually against staging on every deploy; when it makes sense, extendlogin.spec.tswith atest.describe.serial('signed-in flow')guarded by an env flag pointing at a throwaway test DB.Local verification
npm run test:unit— 3 files, 24 tests, ~800msnpm run check— 0 errors, 0 warningsnpm run test:e2e— Playwright browser download failed locally on my machine (transient network). CI installs its own Chromium so this doesn't block the workflow.Companion
No PHP-side changes. Closes items #4 and #5 from William's punch list.