Skip to content

Commit 76980a7

Browse files
author
jun
committed
test(gui): count the Cursor row in the overview totals and allowlist its brand labels in fr
CI shard 2 and gates caught two files outside the focused set: the overview row-count expectations (four native rows became five) and the French accidental-English guard, which needs the same four Cursor brand keys the zh-TW and per-locale guards already list.
1 parent ba83fc4 commit 76980a7

2 files changed

Lines changed: 21 additions & 7 deletions

File tree

‎gui/tests/fr-localization.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ const INTENTIONAL_ENGLISH = new Set<TKey>([
8686
"integrations.tab.codex",
8787
"integrations.tab.claude",
8888
"integrations.tab.grok",
89+
// Cursor product names and the two field labels Cursor's own gateway form renders in English.
90+
"integrations.tab.cursor",
91+
"integrations.cursor.title",
92+
"integrations.cursor.privateInference",
93+
"integrations.cursor.baseUrl",
8994
"integrations.tab.opencode",
9095
"integrations.tab.pi",
9196
"integrations.tab.omp",

‎gui/tests/integrations-overview-rows.test.ts‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function sources(overrides: Partial<OverviewSources> = {}): OverviewSources {
3535
claude: null,
3636
claudeDesktop: null,
3737
grok: null,
38+
cursor: null,
3839
native: null,
3940
nativeSettled: true,
4041
...overrides,
@@ -49,14 +50,14 @@ function rowById(built: ReturnType<typeof buildOverviewRows>, id: string) {
4950

5051
test("a null source is unknown, never absent, and is counted in neither total", () => {
5152
const built = buildOverviewRows(sources());
52-
for (const id of ["codex", "claude", "claudeDesktop", "grok"]) {
53+
for (const id of ["codex", "claude", "claudeDesktop", "grok", "cursor"]) {
5354
expect(rowById(built, id).state).toBe("unknown");
5455
}
5556
const counts = countOverviewRows(built.rows);
5657
expect(counts.detected).toBe(0);
5758
expect(counts.applied).toBe(0);
58-
// Four, not five: keys is a credential surface and never a client row.
59-
expect(counts.unknown).toBe(4);
59+
// Five, not six: keys is a credential surface and never a client row.
60+
expect(counts.unknown).toBe(5);
6061
});
6162

6263
test("Codex reads routingInjected, not status", () => {
@@ -212,18 +213,26 @@ test("every client counts toward the summary, not just the file clients", () =>
212213
disableBlocked: null,
213214
}],
214215
grok: { present: true, models: [{}, {}] },
216+
cursor: {
217+
privateInference: { installed: true, path: "/Applications/Cursor Private Inference.app", version: "3.18.25" },
218+
regularCursor: { installed: false, path: null },
219+
gateway: { baseUrl: "http://127.0.0.1:10100/v1", apiKeyMode: "placeholder", placeholder: "opencodex-loopback" },
220+
lastSeen: { at: Date.now() - 60_000, userAgent: "Cursor/3.18.25" },
221+
models: [],
222+
guideUrl: "https://example.invalid/guide",
223+
},
215224
}));
216225
const counts = countOverviewRows(rows.rows);
217-
// codex + claude + desktop + grok + opencode. Keys are deliberately absent:
226+
// codex + claude + desktop + grok + cursor + opencode. Keys are deliberately absent:
218227
// an issued credential is not an applied client.
219-
expect(counts.applied).toBe(5);
228+
expect(counts.applied).toBe(6);
220229
expect(counts.stale).toBe(1);
221230
expect(counts.unknown).toBe(0);
222231
});
223232

224233
test("an unsettled file list renders unknown rows instead of dropping them", () => {
225234
const built = buildOverviewRows(sources({ clients: [], clientsSettled: false }));
226-
expect(built.rows).toHaveLength(16);
235+
expect(built.rows).toHaveLength(17);
227236
expect(rowById(built, "omp").state).toBe("unknown");
228237
expect(rowById(built, "mcode").state).toBe("unknown");
229238
expect(rowById(built, "zcode").state).toBe("unknown");
@@ -238,7 +247,7 @@ test("an unsettled file list renders unknown rows instead of dropping them", ()
238247

239248
// Once settled, a client the server omitted is genuinely gone.
240249
const settled = buildOverviewRows(sources({ clients: [], clientsSettled: true }));
241-
expect(settled.rows).toHaveLength(4);
250+
expect(settled.rows).toHaveLength(5);
242251
expect(settled.rows.some(row => row.hash === "integrations/keys")).toBe(false);
243252
});
244253

0 commit comments

Comments
 (0)