adf0d17497
publish / version_or_publish (push) Has been cancelled
storybook-build / changes (push) Has been cancelled
storybook-build / :storybook-build (push) Has been cancelled
Sync Gradio Skills to Hugging Face / sync-skills (push) Has been cancelled
functional / changes (push) Has been cancelled
functional / build-frontend (push) Has been cancelled
functional / functional-test-SSR=false (push) Has been cancelled
functional / functional-reload (push) Has been cancelled
js / changes (push) Has been cancelled
js / js-test (push) Has been cancelled
docs-build / changes (push) Has been cancelled
docs-build / docs-build (push) Has been cancelled
docs-build / website-build (push) Has been cancelled
functional / functional-test-SSR=true (push) Has been cancelled
hygiene / hygiene-test (push) Has been cancelled
python / changes (push) Has been cancelled
python / build (push) Has been cancelled
python / test-ubuntu-latest-flaky (push) Has been cancelled
python / test-ubuntu-latest-not-flaky (push) Has been cancelled
python / test-windows-latest-flaky (push) Has been cancelled
python / test-windows-latest-not-flaky (push) Has been cancelled
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { test, expect } from "@self/tootils";
|
|
|
|
test("test theme builder changes are applied", async ({ page }) => {
|
|
await page.getByLabel("Theme", { exact: true }).click();
|
|
await page.getByLabel("Soft", { exact: true }).click();
|
|
await page.getByRole("button", { name: "Load Theme" }).click();
|
|
|
|
const go_btn = page.getByRole("button", { name: "Go", exact: true });
|
|
|
|
// Wait for Soft theme to be fully applied before changing the primary hue,
|
|
// otherwise the Load Theme and emerald select event chains can race.
|
|
await expect(go_btn).toHaveCSS(
|
|
"font-family",
|
|
"Montserrat, ui-sans-serif, system-ui, sans-serif"
|
|
);
|
|
|
|
await page.getByRole("tab", { name: "Core Colors" }).click();
|
|
await page.getByLabel("Primary Hue").click();
|
|
await page.getByLabel("emerald").click();
|
|
|
|
await expect(go_btn).toHaveCSS("background-color", "rgb(16, 185, 129)");
|
|
|
|
await page.getByRole("button", { name: "View Code ▼" }).click();
|
|
const code = page.getByLabel("Code input container");
|
|
await expect(code).toContainText("gr.themes.Soft");
|
|
await expect(code).toContainText('primary_hue="emerald"');
|
|
});
|