ui: polish first-run setup copy and dialog dismissal
This commit is contained in:
@@ -52,7 +52,8 @@ describe("ZeroKeysPill — the composer-hoisted notice", () => {
|
||||
it("the pill takes the CTA's chrome with its own testid and copy", () => {
|
||||
const html = renderToStaticMarkup(createElement(ZeroKeysPill, { onOpen: () => {} }));
|
||||
assert.ok(html.includes('data-testid="setup-cta-keys"'));
|
||||
assert.ok(html.includes("Add a provider key"));
|
||||
assert.match(html, />Add a provider key<\/button>/);
|
||||
assert.doesNotMatch(html, /chats start|—/);
|
||||
// the models CTA's testid must not appear on the keys pill
|
||||
assert.ok(!html.includes('data-testid="setup-cta"'));
|
||||
});
|
||||
@@ -75,8 +76,9 @@ describe("SetupKeysBody — stage 1's self-contained first-key screen", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
createElement(SetupKeysBody, { ...base, providers: PROVIDERS, provider: null }),
|
||||
);
|
||||
assert.match(html, /First, add a provider key\./);
|
||||
assert.ok(html.includes("The model pickers list only what your keys unlock"));
|
||||
assert.match(html, /Add a provider key\./);
|
||||
assert.ok(html.includes("Choose your AI provider and paste its API key. You’ll pick your models next."));
|
||||
assert.doesNotMatch(html, /First, add|keys unlock|—/);
|
||||
assert.ok(html.includes('data-testid="setup-key-provider"'));
|
||||
assert.ok(html.includes("Pick a provider…"));
|
||||
assert.ok(!html.includes('data-testid="setup-key-input"'), "no paste field before a provider is picked");
|
||||
|
||||
Reference in New Issue
Block a user