settings-nav robust: Sofort-Sprung statt Smooth-Scroll, Spec wartet auf networkidle
All checks were successful
CI / Lint, typecheck, test (pull_request) Successful in 4m37s
CI / Build container images (pull_request) Successful in 1m8s
CI / Import/export fidelity gate (pull_request) Successful in 54s
CI / Auth e2e pack (pull_request) Successful in 7m11s
CD / Build and push images (push) Successful in 18s
CD / Deploy to Test (push) Successful in 14s
CD / Smoke tests against Test (push) Successful in 1m42s
CD / Promote to Int (push) Successful in 15s
CI / Lint, typecheck, test (push) Successful in 5m21s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Successful in 7m19s
CI / Import/export fidelity gate (push) Successful in 58s
All checks were successful
CI / Lint, typecheck, test (pull_request) Successful in 4m37s
CI / Build container images (pull_request) Successful in 1m8s
CI / Import/export fidelity gate (pull_request) Successful in 54s
CI / Auth e2e pack (pull_request) Successful in 7m11s
CD / Build and push images (push) Successful in 18s
CD / Deploy to Test (push) Successful in 14s
CD / Smoke tests against Test (push) Successful in 1m42s
CD / Promote to Int (push) Successful in 15s
CI / Lint, typecheck, test (push) Successful in 5m21s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Successful in 7m19s
CI / Import/export fidelity gate (push) Successful in 58s
Der animierte scrollIntoView landete auf einer veralteten Zielposition, wenn Query-Sektionen (Sessions/Tokens) während der Animation noch wuchsen — auf dem CI-Runner deterministisch rot. Jetzt springt die Navigation sofort; der Spec lässt die asynchronen Inhalte vor dem Klick settlen (networkidle) und lief lokal 10× ohne Retry grün. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0155v2aT8AG1kZDQEZiCLBWC
This commit is contained in:
parent
5444c39458
commit
58f175af32
@ -20,6 +20,9 @@ test('user settings show the jump nav and clicking scrolls + activates', async (
|
|||||||
const context = await contextForUser(browser, BASE_URL, 'fixture-user');
|
const context = await contextForUser(browser, BASE_URL, 'fixture-user');
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.goto('/settings');
|
await page.goto('/settings');
|
||||||
|
// Let the async section content (sessions, tokens, …) settle first —
|
||||||
|
// sections growing above the target would push it out of view again.
|
||||||
|
await page.waitForLoadState('networkidle');
|
||||||
|
|
||||||
const nav = page.locator('.settings-nav');
|
const nav = page.locator('.settings-nav');
|
||||||
await expect(nav).toBeVisible();
|
await expect(nav).toBeVisible();
|
||||||
@ -46,6 +49,7 @@ test('pond settings derive the nav from their sections', async ({ browser }) =>
|
|||||||
|
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.goto(`/p/${pond.slug}/settings`);
|
await page.goto(`/p/${pond.slug}/settings`);
|
||||||
|
await page.waitForLoadState('networkidle');
|
||||||
|
|
||||||
const links = page.locator('.settings-nav .settings-nav__link');
|
const links = page.locator('.settings-nav .settings-nav__link');
|
||||||
// The pond owner sees the full section stack — at least members, labels,
|
// The pond owner sees the full section stack — at least members, labels,
|
||||||
|
|||||||
@ -102,7 +102,9 @@ export function SettingsLayout({ children }: { children: React.ReactNode }): Rea
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const jump = (id: string): void => {
|
const jump = (id: string): void => {
|
||||||
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
// Instant, not smooth: async section content (queries) can still grow
|
||||||
|
// during an animation, leaving it at a stale target position.
|
||||||
|
document.getElementById(id)?.scrollIntoView({ block: 'start' });
|
||||||
setActive(id);
|
setActive(id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user