Skip to content

Commit 79e43a6

Browse files
test: cover repeated legacy login query params (#15054)
## Summary Ports the repeated-query regression coverage identified in superseded PR #15022 after #15026 merged the legacy `/login` redirect. Original coverage and test approach are attributed to #15022 / @dante01yoon. ## Changes - **What**: Extend the existing real-router redirect test to verify `/login?campaign=one&campaign=two` reaches `cloud-login` with `query.campaign` equal to `['one', 'two']`. ## Review Focus Confirm the assertion covers Vue Router's repeated-query parsing while retaining the existing query, hash, and no-loop coverage. ## Validation - `pnpm test:unit src/platform/cloud/onboarding/onboardingCloudRoutes.test.ts` — 11 tests passed - `pnpm exec oxfmt --check src/platform/cloud/onboarding/onboardingCloudRoutes.test.ts` — passed - `git diff --check origin/main...HEAD` — passed - Commit hooks: typecheck, Oxlint, ESLint, and formatting passed; push hook Knip passed ## Screenshots (if applicable) Not applicable; this PR is test-only. Co-authored-by: Amp <amp@ampcode.com>
1 parent cb2b7c6 commit 79e43a6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/platform/cloud/onboarding/onboardingCloudRoutes.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ describe('cloudOnboardingRoutes', () => {
7878
})
7979

8080
it('preserves the query and hash through the legacy /login redirect', async () => {
81-
const to = await attemptNavigation('/login?previousFullPath=%2Ffoo#section')
81+
const to = await attemptNavigation(
82+
'/login?previousFullPath=%2Ffoo&campaign=one&campaign=two#section'
83+
)
8284

8385
expect(to.name).toBe('cloud-login')
8486
expect(to.query.previousFullPath).toBe('/foo')
87+
expect(to.query.campaign).toEqual(['one', 'two'])
8588
expect(to.hash).toBe('#section')
8689
})
8790

0 commit comments

Comments
 (0)