mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 16:36:37 +02:00
🔧 Use a more correct selector in one test
This commit is contained in:
parent
9fde4e2121
commit
02bc6e62e7
1 changed files with 10 additions and 3 deletions
|
@ -121,7 +121,11 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
|
||||
await expect(tokensTabPanel.getByLabel("primary")).toBeEnabled();
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", {
|
||||
name: "color.primary",
|
||||
}),
|
||||
).toBeEnabled();
|
||||
|
||||
// Create token referencing the previous one with keyboard
|
||||
|
||||
|
@ -138,8 +142,11 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
await expect(submitButton).toBeEnabled();
|
||||
await nameField.press("Enter");
|
||||
|
||||
const referenceToken = tokensTabPanel.getByLabel("color.secondary");
|
||||
await expect(referenceToken).toBeEnabled();
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", {
|
||||
name: "color.secondary",
|
||||
}),
|
||||
).toBeEnabled();
|
||||
|
||||
// Tokens tab panel should have two tokens with the color red / #ff0000
|
||||
await expect(tokensTabPanel.getByTitle("#ff0000")).toHaveCount(2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue