mirror of
https://github.com/penpot/penpot.git
synced 2025-07-28 21:37:20 +02:00
♻️ Update button-icon with tooltip component (#6539)
* 🐛 Add tooltip to base icon button * 🎉 Update id prop * 🐛 Fix test
This commit is contained in:
parent
55997a3d4a
commit
a2abaea637
10 changed files with 60 additions and 39 deletions
|
@ -40,6 +40,7 @@ test("Create a LINEAR gradient", async ({ page }) => {
|
|||
fileId: "6191cd35-bb1f-81f7-8004-7cc63d087374",
|
||||
pageId: "6191cd35-bb1f-81f7-8004-7cc63d087375",
|
||||
});
|
||||
|
||||
await workspacePage.clickLeafLayer("Rectangle");
|
||||
|
||||
const swatch = workspacePage.page.getByRole("button", { name: "#B1B2B5" });
|
||||
|
@ -74,17 +75,21 @@ test("Create a LINEAR gradient", async ({ page }) => {
|
|||
|
||||
const inputColor2 = workspacePage.colorpicker
|
||||
.getByPlaceholder("Mixed")
|
||||
.nth(1);
|
||||
.nth(2);
|
||||
await inputColor2.fill("red");
|
||||
|
||||
const inputOpacity2 = workspacePage.colorpicker.getByPlaceholder("--").nth(1);
|
||||
await inputOpacity2.fill("100");
|
||||
const inputOpacity2 = workspacePage.colorpicker.getByPlaceholder("--").nth(2);
|
||||
await inputOpacity2.fill("40");
|
||||
|
||||
const inputOpacityGlobal = workspacePage.page
|
||||
.locator("div")
|
||||
.filter({ hasText: /^FillLinear gradient%$/ })
|
||||
.getByPlaceholder("--");
|
||||
await inputOpacityGlobal.fill("100");
|
||||
const inputOpacityGlobal = workspacePage.colorpicker.getByTestId(
|
||||
"opacity-global-input",
|
||||
);
|
||||
await inputOpacityGlobal.fill("50");
|
||||
await inputOpacityGlobal.press("Enter");
|
||||
await expect(inputOpacityGlobal).toHaveValue("50");
|
||||
await expect(inputOpacityGlobal).toBeVisible();
|
||||
|
||||
await expect(workspacePage.page.getByText("Linear gradient")).toBeVisible();
|
||||
});
|
||||
|
||||
test("Create a RADIAL gradient", async ({ page }) => {
|
||||
|
@ -147,8 +152,18 @@ test("Create a RADIAL gradient", async ({ page }) => {
|
|||
const inputColor2 = workspacePage.page.getByPlaceholder("Mixed").nth(2);
|
||||
await inputColor2.fill("red");
|
||||
|
||||
const inputOpacity2 = workspacePage.colorpicker.getByPlaceholder("--").nth(1);
|
||||
const inputOpacity2 = workspacePage.colorpicker.getByPlaceholder("--").nth(2);
|
||||
await inputOpacity2.fill("100");
|
||||
|
||||
const inputOpacityGlobal = workspacePage.colorpicker.getByTestId(
|
||||
"opacity-global-input",
|
||||
);
|
||||
await inputOpacityGlobal.fill("50");
|
||||
await inputOpacityGlobal.press("Enter");
|
||||
await expect(inputOpacityGlobal).toHaveValue("50");
|
||||
await expect(inputOpacityGlobal).toBeVisible();
|
||||
|
||||
await expect(workspacePage.page.getByText("Radial gradient")).toBeVisible();
|
||||
});
|
||||
|
||||
test("Gradient stops limit", async ({ page }) => {
|
||||
|
|
|
@ -92,7 +92,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel.getByTitle("Add token: Color").click();
|
||||
await tokensTabPanel
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
|
||||
// Create color token with mouse
|
||||
|
||||
|
@ -129,7 +131,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
|
||||
// Create token referencing the previous one with keyboard
|
||||
|
||||
await tokensTabPanel.getByTitle("Add token: Color").click();
|
||||
await tokensTabPanel
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
await nameField.click();
|
||||
|
@ -171,7 +175,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel.getByTitle("Add token: Dimensions").click();
|
||||
await tokensTabPanel
|
||||
.getByRole("button", { name: "Add token: Dimensions" })
|
||||
.click();
|
||||
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
|
@ -351,7 +357,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel.getByTitle("Add token: Color").click();
|
||||
await tokensTabPanel
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
|
||||
// Create grouped color token with mouse
|
||||
|
||||
|
@ -382,7 +390,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
|||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel.getByTitle("Add token: Color").click();
|
||||
await tokensTabPanel
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
|
|
|
@ -22,7 +22,7 @@ test("Group bubbles when zooming out if they overlap", async ({ page }) => {
|
|||
const zoom = page.getByTitle("Zoom");
|
||||
await zoom.click();
|
||||
|
||||
const zoomOut = page.getByTitle("Zoom out");
|
||||
const zoomOut = page.getByRole("button", { name: "Zoom out" });
|
||||
await zoomOut.click();
|
||||
await zoomOut.click();
|
||||
await zoomOut.click();
|
||||
|
|
|
@ -18,7 +18,7 @@ test("User haven't toolbar", async ({ page }) => {
|
|||
});
|
||||
|
||||
test("User haven't edition menu entries", async ({ page }) => {
|
||||
await page.getByTitle("main menu").click();
|
||||
await page.getByRole("button", { name: "Main menu" }).click();
|
||||
await page.getByText("file").last().click();
|
||||
|
||||
await expect(page.getByText("Add as Shared Library")).toBeHidden();
|
||||
|
|
|
@ -294,7 +294,7 @@ test("User have edition menu entries", async ({ page }) => {
|
|||
await workspacePage.setupEmptyFile(page);
|
||||
await workspacePage.goToWorkspace();
|
||||
|
||||
await page.getByTitle("Main menu").click();
|
||||
await page.getByRole("button", { name: "Main menu" }).click();
|
||||
await page.getByText("file").last().click();
|
||||
|
||||
await expect(page.getByText("Add as Shared Library")).toBeVisible();
|
||||
|
@ -390,7 +390,7 @@ test("[Taiga #9930] Zoom fit all doesn't fits all", async ({
|
|||
const zoom = await page.getByTitle("Zoom");
|
||||
await zoom.click();
|
||||
|
||||
const zoomIn = await page.getByTitle("Zoom in");
|
||||
const zoomIn = await page.getByRole("button", { name: "Zoom in" });
|
||||
await zoomIn.click();
|
||||
await zoomIn.click();
|
||||
await zoomIn.click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue