mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 00:36:37 +02:00
✨ Check for auto-created set
This commit is contained in:
parent
439ca4b52c
commit
85fa635f66
4 changed files with 21 additions and 4 deletions
|
@ -27,7 +27,9 @@ test.describe("Tokens: Tab", () => {
|
|||
await expect(tokensTabPanel).toHaveText(/Themes/);
|
||||
});
|
||||
|
||||
test("Created color token shows up in the sidebar", async ({ page }) => {
|
||||
test("User creates color token and auto created set show up in the sidebar", async ({
|
||||
page,
|
||||
}) => {
|
||||
const workspacePage = new WorkspacePage(page);
|
||||
await workspacePage.setupEmptyFile();
|
||||
await workspacePage.mockRPC(
|
||||
|
@ -83,5 +85,17 @@ test.describe("Tokens: Tab", () => {
|
|||
|
||||
// Tokens tab panel should have two tokens with the color red / #ff0000
|
||||
await expect(tokensTabPanel.getByTitle("#ff0000")).toHaveCount(2);
|
||||
|
||||
// Global set has been auto created and is active
|
||||
await expect(
|
||||
workspacePage.tokenThemesSetsSidebar.getByRole("button", {
|
||||
name: "Global",
|
||||
}),
|
||||
).toHaveCount(1);
|
||||
await expect(
|
||||
workspacePage.tokenThemesSetsSidebar.getByRole("button", {
|
||||
name: "Global",
|
||||
}),
|
||||
).toHaveAttribute("aria-checked", "true");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue