Skip to content

Commit e7a71c1

Browse files
committed
fix(tests): update two source-shape checks the dev tip left behind
Both failures are on origin/dev independently of this branch, and both come from the same shape: a test that asserts on the TEXT of a source file, pinned to a spelling the implementation has since changed. 8b67220 threaded nativeContextLimits through the remaining Codex and Desktop writers, but sync-client-integrations still required the retired providerContextCap spelling -- so the check failed against the very change it exists to pin. The GUI cap-display check required a one-line expression that is now wrapped and has grown a native branch, so it was pinning formatting rather than behaviour. Match the current spellings, and match the GUI expression as fragments so a reflow cannot fail it again. Verified on origin/dev before this branch was rebased onto it: the sync case fails there with the same message, and the GUI case fails there in a clean worktree.
1 parent f3a6120 commit e7a71c1

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎gui/tests/models-native-group-controls.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ test("the native group keeps its window readable with the cap switched off", asy
6060
expect(src).toContain("{(capOn || nativeProviderGroup) && (");
6161
// With the cap off the stored value is only what a future toggle would apply — the 350k
6262
// default — so the display falls back to the widest window the rows actually advertise.
63-
expect(src).toContain("const capDisplayValue = capOn ? providerCap : (widestRowWindow ?? providerCap);");
63+
// Matched as separate fragments because the expression is wrapped across lines now, and
64+
// it grew a native branch: with the cap off the native group shows its default window
65+
// rather than the widest advertised row. A single-line literal pinned the formatting
66+
// instead of the behaviour and broke on the reflow that introduced that branch.
67+
expect(src).toContain("const capDisplayValue = capOn");
68+
expect(src).toContain("nativeProviderGroup ? NATIVE_GPT56_DEFAULT_WINDOW : (widestRowWindow ?? providerCap)");
6469
// The select is inert until the cap is actually on: showing a number is not the same as
6570
// offering to change one.
6671
expect(src).toContain("disabled={busy || !capOn}");

‎tests/sync-client-integrations.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ describe("ocx sync fans out to the client integrations that are switched on", ()
5151
// One catch per client: a broken Grok file is a warning, not a 500 on a command whose
5252
// main job (the Codex catalog) succeeded.
5353
expect(fn.match(/catch \(error\)/g)?.length).toBe(2);
54-
// The Desktop write gets the provider cap, same as every other Desktop call site.
55-
expect(fn).toContain("providerContextCap(config, OPENAI_CODEX_PROVIDER_ID)");
54+
// The Desktop write gets the native context limits, same as every other Desktop
55+
// call site. 8b672205e threaded `nativeContextLimits` through those writers and
56+
// left this assertion naming the retired `providerContextCap` spelling, so the
57+
// source-shape check failed against the very change it is meant to pin.
58+
expect(fn).toContain("nativeContextLimits(config)");
5659
// A client that is off is omitted rather than reported: the caller has to be able to
5760
// tell "left alone" from "tried and failed", so there is no skipped state to emit.
5861
expect(fn).not.toContain('"skipped"');
5962
});
6063
});
61-

0 commit comments

Comments
 (0)