authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:18:18-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:18:18-07:00
log10421bcdc9a059e0a717250257769af92567b645
tree0645cf841491b265df9e2278446b55da7763d91d
parent371e32392570fdc0d2309e9f92490bbd2c6b3f02
signature Signed by PGP key B5690EEEBB952194

test(server): remove static OAuth page snapshots (#9986)


2 files changed, 1 insertions(+), 32 deletions(-)

apps/server/src/cloud/cliAuthHtml.test.ts deleted-31
...@@ -1,31 +0,0 @@
1import { expect, it } from "@effect/vitest";
2
3import {
4 renderLoopbackAuthorizationCompleteHtml,
5 resolveLoopbackAuthorizationStage,
6} from "./cliAuthHtml.ts";
7
8it("renders the branded loopback authorization completion page", () => {
9 const html = renderLoopbackAuthorizationCompleteHtml();
10
11 expect(resolveLoopbackAuthorizationStage()).toBe("dev");
12 expect(html).toContain("T3 Code (Dev)");
13 expect(html).toContain('class="stage stage-dev"');
14 expect(html).not.toContain("Secure terminal handoff");
15 expect(html).toContain("You're connected");
16 expect(html).toContain("Return to your terminal");
17 expect(html).not.toContain('class="next"');
18 expect(html).toContain('name="viewport"');
19 expect(html).not.toContain('class="status"');
20});
21
22it("renders the matching header treatment for each release channel", () => {
23 const nightly = renderLoopbackAuthorizationCompleteHtml("nightly");
24 const latest = renderLoopbackAuthorizationCompleteHtml("latest");
25
26 expect(nightly).toContain("T3 Code (Nightly)");
27 expect(nightly).toContain('class="stage stage-nightly"');
28 expect(latest).toContain('<p class="brand">T3 Code</p>');
29 expect(latest).not.toContain("(Latest)");
30 expect(latest).toContain('class="stage stage-latest"');
31});
apps/server/src/cloud/cliAuthHtml.ts+1-1
...@@ -2,7 +2,7 @@ export type LoopbackAuthorizationStage = "dev" | "nightly" | "latest";...@@ -2,7 +2,7 @@ export type LoopbackAuthorizationStage = "dev" | "nightly" | "latest";
22
3declare const __T3CODE_BUILD_CHANNEL__: "nightly" | "latest" | undefined;3declare const __T3CODE_BUILD_CHANNEL__: "nightly" | "latest" | undefined;
44
5export function resolveLoopbackAuthorizationStage(): LoopbackAuthorizationStage {5function resolveLoopbackAuthorizationStage(): LoopbackAuthorizationStage {
6 return typeof __T3CODE_BUILD_CHANNEL__ === "undefined" ? "dev" : __T3CODE_BUILD_CHANNEL__;6 return typeof __T3CODE_BUILD_CHANNEL__ === "undefined" ? "dev" : __T3CODE_BUILD_CHANNEL__;
7}7}
88