Skip to content

Commit

Permalink
[wb-button-semantic] Remove irrelevant unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Andrade committed Jan 21, 2025
1 parent f8ac0f8 commit b79976c
Showing 1 changed file with 0 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,50 +228,4 @@ describe("button with icon", () => {
expect(icon).toBeInTheDocument();
expect(icon).toHaveAttribute("aria-hidden", "true");
});

test("default theme tertiary button icon has no hover style", async () => {
// Arrange
render(
<Button kind="tertiary" testId={"button-icon-test"} endIcon={plus}>
Label
</Button>,
);

// Act
const button = await screen.findByTestId("button-icon-test");
const iconWrapper = await screen.findByTestId(
"button-icon-test-end-icon-wrapper",
);
await userEvent.hover(button);

// Assert
expect(iconWrapper).toHaveStyle(`backgroundColor: transparent`);
});

test("Khanmigo tertiary button icon has hover style", async () => {
// Arrange
render(
<ThemeSwitcherContext.Provider value="khanmigo">
<Button
kind="tertiary"
testId={"button-icon-test"}
endIcon={plus}
>
Label
</Button>
</ThemeSwitcherContext.Provider>,
);

// Act
const button = await screen.findByTestId("button-icon-test");
const iconWrapper = await screen.findByTestId(
"button-icon-test-end-icon-wrapper",
);
await userEvent.hover(button);

// Assert
expect(iconWrapper).toHaveStyle(
`backgroundColor: ${color.fadedBlue16}`,
);
});
});

0 comments on commit b79976c

Please sign in to comment.