Stabilize CI runtime for updated deps and unblock Dependabot auto-format flow (#185)

* chore: apply ci and dependabot remediation changes

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot
2026-08-01 10:58:33 +08:00
committed by GitHub
parent 95b51f0209
commit 04fbddb979
59 changed files with 627 additions and 516 deletions
+5 -18
View File
@@ -32,15 +32,11 @@ function renderAtPath(path: string, child: React.ReactNode) {
<Routes>
<Route
path="/dashboard/login"
element={
<ProtectedRoute>{child}</ProtectedRoute>
}
element={<ProtectedRoute>{child}</ProtectedRoute>}
/>
<Route
path="/dashboard/*"
element={
<ProtectedRoute>{child}</ProtectedRoute>
}
element={<ProtectedRoute>{child}</ProtectedRoute>}
/>
</Routes>
</MemoryRouter>,
@@ -50,18 +46,12 @@ function renderAtPath(path: string, child: React.ReactNode) {
}
test("ProtectedRoute does not mount children for protected paths while auth is loading", async () => {
await renderAtPath(
"/dashboard",
<div data-testid="protected-child">protected</div>,
)
await renderAtPath("/dashboard", <div data-testid="protected-child">protected</div>)
expect(document.querySelector("[data-testid='protected-child']")).toBeNull()
})
test("ProtectedRoute renders children on the login page even while auth is loading", async () => {
await renderAtPath(
"/dashboard/login",
<div data-testid="login-child">login</div>,
)
await renderAtPath("/dashboard/login", <div data-testid="login-child">login</div>)
expect(document.querySelector("[data-testid='login-child']")).not.toBeNull()
})
@@ -100,9 +90,6 @@ test("ProtectedRoute redirects unauthenticated users without mounting protected
test("ProtectedRoute renders children once an authenticated profile resolves", async () => {
mockLoading = false
mockProfile = { id: 1, role: 0 }
await renderAtPath(
"/dashboard",
<div data-testid="protected-child">protected</div>,
)
await renderAtPath("/dashboard", <div data-testid="protected-child">protected</div>)
expect(document.querySelector("[data-testid='protected-child']")).not.toBeNull()
})