Use sans settings labels and link Deepgram key setup
This commit is contained in:
@@ -229,10 +229,12 @@ for (const source of ["none", "file", "env"] as const) test(`Language is below t
|
||||
assert.equal(rows[0]!.getAttribute("data-testid"), "key-deepgram_api_key");
|
||||
assert.equal(rows[1]!.getAttribute("data-testid"), "row-dictation-language");
|
||||
assert.equal(rows[2]!.getAttribute("data-testid"), "dictation-setup-hint");
|
||||
assert.equal(byTest("dictation-setup-hint").textContent, "Create a Deepgram key with the Member role or higher, then add it above.");
|
||||
assert.equal(byTest("dictation-setup-hint").textContent, "Create a Deepgram API key with the Member role or higher, then add it above.");
|
||||
assert.match(byTest("dictation-setup-hint").className, /text-muted-foreground/);
|
||||
assert.equal(byTest("dictation-setup-hint").querySelector("a")!.href, "https://developers.deepgram.com/reference/auth/tokens/grant");
|
||||
assert.match(rows[1]!.querySelector("span")!.className, /font-ui text-xs/);
|
||||
assert.equal(byTest("dictation-setup-hint").querySelector("a")!.href, "https://console.deepgram.com/");
|
||||
assert.equal(byTest("dictation-setup-hint").querySelector("a")!.textContent, "Deepgram API key");
|
||||
assert.equal(byTest("dictation-setup-hint").querySelectorAll("a").length, 1);
|
||||
assert.match(rows[1]!.querySelector(".font-prose")!.className, /text-\(length:--lh-prose-size\)/);
|
||||
assert.equal(trigger().disabled, false, "language is independent of key ownership");
|
||||
await click(byTest("key-deepgram_api_key-row"));
|
||||
if (source !== "env") assert.ok(byTest("key-deepgram_api_key-editor"));
|
||||
|
||||
@@ -21,6 +21,7 @@ import { SettingsDialogBody, SettingsDialogProvider } from "../components/settin
|
||||
import { KEYBOARD_ACTIONS } from "../src/core/index.ts";
|
||||
import { DictationLanguageSetting } from "../components/dictation-language.tsx";
|
||||
import { SettingsMenuTrigger } from "../components/settings/controls.tsx";
|
||||
import { SubscriptionConnections } from "../components/settings/subscription-connections.tsx";
|
||||
|
||||
/** The full opening tag of the element carrying a testid — attribute
|
||||
* order in React output is not contractual, so assertions run on the
|
||||
@@ -89,6 +90,25 @@ describe("the shared settings dropdown trigger", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Providers settings-label typography", () => {
|
||||
it("Language uses the standard sans SettingsRow label without changing its mono trigger", () => {
|
||||
const html = renderToStaticMarkup(<DictationLanguageSetting />);
|
||||
assert.ok(html.includes('<span class="block font-prose text-(length:--lh-prose-size)">Language</span>'));
|
||||
assert.ok(tagOf(html, "dictation-language").includes("font-ui text-xs"));
|
||||
});
|
||||
|
||||
it("only Providers subscription labels use sans; setup labels retain their compact mono styling", () => {
|
||||
const settings = renderToStaticMarkup(<SubscriptionConnections />);
|
||||
const setup = renderToStaticMarkup(<SubscriptionConnections setup />);
|
||||
for (const label of ["ChatGPT", "GitHub Copilot", "Grok"]) {
|
||||
assert.ok(settings.includes(`<span class="font-prose text-(length:--lh-prose-size) text-foreground">${label}</span>`), `${label}: settings sans label`);
|
||||
assert.ok(setup.includes(`<span class="font-ui text-xs text-foreground">${label}</span>`), `${label}: unchanged setup label`);
|
||||
}
|
||||
assert.equal((settings.match(/>Connect<\/button>/g) ?? []).length, 3);
|
||||
assert.equal((setup.match(/>Connect<\/button>/g) ?? []).length, 3);
|
||||
});
|
||||
});
|
||||
|
||||
describe("AgentSection (thin SSR)", () => {
|
||||
it("renders the three model SLOT rows (slots-only, fix wave: unpicked reads —, no Default option)", () => {
|
||||
const html = renderToStaticMarkup(<AgentSection agent={undefined} models={undefined} graph={undefined} onSectionChange={() => {}} onModelsChange={() => {}} />);
|
||||
|
||||
Reference in New Issue
Block a user