fix(10-04): prettier format + remove unnecessary type assertions

- Run prettier on all new/modified PWA files (CredentialSheet, SetupBanner, AdminPage, admin.spec.ts)
- Remove unnecessary 'as React.RefObject<HTMLElement | null>' casts flagged by @typescript-eslint/no-unnecessary-type-assertion
- Format pre-existing API files from Plans 02/03 (me.ts, user.test.ts, requireAdmin.test.ts, me.test.ts)
- All 270 API tests + 191 PWA vitest tests pass; lint/typecheck/build clean
This commit is contained in:
Lucas Berger
2026-06-13 15:22:50 -04:00
parent 7808426a2f
commit 79fe3e0e04
8 changed files with 89 additions and 56 deletions
+1 -3
View File
@@ -100,9 +100,7 @@ test.describe('Non-admin user — admin nav entry hidden + /admin redirect', ()
await page.waitForURL(/\/calendar/, { timeout: 10_000 });
// Should have landed on /calendar
const url = new URL(page.url());
expect(url.pathname, `Expected /calendar but got ${url.pathname}`).toMatch(
/^\/(calendar)?$/,
);
expect(url.pathname, `Expected /calendar but got ${url.pathname}`).toMatch(/^\/(calendar)?$/);
// "Admin Settings" heading must NOT be present
await expect(page.getByRole('heading', { name: 'Admin Settings' })).toHaveCount(0);
});