fix(admin): absolute sidebar nav links so /admin URLs don't accumulate (v0.52.2)
The /admin left-rail NavLinks used relative targets (to="users", etc.). Under the /admin/* nested route a relative link resolves against the current URL, so each click appended a segment — Users→Allowlist→Graduation yielded /admin/users/allowlist/graduation instead of /admin/graduation. Use absolute targets (/admin/<tab>) + `end` for exact active matching. Patch 0.52.1 → 0.52.2; CHANGELOG updated. Caught by the operator on PPE. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+15
-6
@@ -43,15 +43,22 @@ test('SLICE-4: edit one entry\'s priority from the detail panel', async ({ page
|
||||
|
||||
const panel = page.locator('.metadata-fields-panel')
|
||||
await expect(panel).toBeVisible()
|
||||
// Seeded at P1; change to P2 and save (direct sidecar commit, D7).
|
||||
await expect(panel.locator('#mf-priority')).toHaveValue('P1')
|
||||
await panel.locator('#mf-priority').selectOption('P2')
|
||||
const select = panel.locator('#mf-priority')
|
||||
// Value-agnostic so the test is idempotent across retries and re-runs: a
|
||||
// prior (committed) edit may have already moved it off the P1 seed. Pick a
|
||||
// target distinct from the current value so Save is a real change.
|
||||
const current = await select.inputValue()
|
||||
const target = current === 'P2' ? 'P1' : 'P2'
|
||||
await select.selectOption(target)
|
||||
await panel.getByRole('button', { name: 'Save' }).click()
|
||||
await expect(panel.getByText('Saved')).toBeVisible()
|
||||
// The save is a real git sidecar commit via the bot (D7); over the deployed
|
||||
// edge the round trip can take tens of seconds — wait generously for the
|
||||
// confirmation rather than the default expect timeout.
|
||||
await expect(panel.getByText('Saved')).toBeVisible({ timeout: 60_000 })
|
||||
|
||||
// Persisted across a reload (read back from the committed sidecar).
|
||||
await page.reload()
|
||||
await expect(page.locator('.metadata-fields-panel #mf-priority')).toHaveValue('P2')
|
||||
await expect(page.locator('.metadata-fields-panel #mf-priority')).toHaveValue(target)
|
||||
})
|
||||
|
||||
// SLICE-5 (PUC-2) — multi-select + bulk action bar, one commit (authed).
|
||||
@@ -71,8 +78,10 @@ test('SLICE-5: bulk-set priority on multiple selected entries', async ({ page })
|
||||
await expect(bar.getByText('2 selected')).toBeVisible()
|
||||
|
||||
// Set priority P1 across both → one commit; a toast reports the result.
|
||||
// Like SLICE-4, the bulk write is a real git commit via the bot; allow the
|
||||
// deployed-edge round trip generous time before the result toast appears.
|
||||
await bar.getByLabel('Set Priority').selectOption('P1')
|
||||
await expect(page.getByText(/2 updated/)).toBeVisible()
|
||||
await expect(page.getByText(/2 updated/)).toBeVisible({ timeout: 60_000 })
|
||||
|
||||
// The change is reflected server-side: the Priority P1 facet now counts the
|
||||
// two newly-updated entries plus the pre-existing P1 (checkout-returning was
|
||||
|
||||
Reference in New Issue
Block a user