diff --git a/test/browser/security.spec.ts b/test/browser/security.spec.ts index 20617ec..1279794 100644 --- a/test/browser/security.spec.ts +++ b/test/browser/security.spec.ts @@ -663,6 +663,9 @@ test("session sign-in keeps reading after the original voting deadline and clear test("an expired vote removes voting access without discarding the reading hash", async ({ page, collector }) => { const session = await collector.send("session", 3); await page.goto(`${collector.url}/#connect=${session.session_token}`); + await expect(page.getByText("You are connected for voting.", { exact: true })).toBeVisible(); + await page.getByRole("navigation", { name: "Main navigation" }) + .getByRole("link", { name: "Feature requests", exact: true }).click(); const vote = page.getByRole("button", { name: "Vote for Synthetic request", exact: true }); await expect(vote).toBeEnabled(); // The server expires first (clock skew or a suspended browser timer). diff --git a/web/main.tsx b/web/main.tsx index 82bcd7d..925a831 100644 --- a/web/main.tsx +++ b/web/main.tsx @@ -158,10 +158,12 @@ function AccessForm({ function Overview({ credential, + voting, unlock, expire, }: { credential: string; + voting: boolean; unlock: (hash: string) => void; expire: () => void; }) { @@ -283,6 +285,11 @@ function Overview({ + {voting && ( +
+ {t.votingConnected} {t.votingDuration} +
+ )} {!data.installations && (
{t.firstReportsTitle} {t.firstReportsIntro} @@ -1136,8 +1143,8 @@ function App() { token: connect, expiresAt: Date.parse(value.expires_at), }); - setRoute("/requests"); - history.replaceState(null, "", "/requests"); + setRoute("/"); + history.replaceState(null, "", "/"); }) .catch(() => { if (!controller.signal.aborted) setSessionError(true); @@ -1192,6 +1199,7 @@ function App() {