Open a finished Rule from its Profile card, and drop it from the browser on Log out.
This commit is contained in:
1 parent
db1599123b
commit
942c7cc9de
17 files changed
+280
-14
No files matched your search
@@ -94,6 +94,25 @@ describe("Rule Component", () => {
|
||||
expect(handleClick).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("keeps bottom links and names the overlay link with ariaLabel", () => {
|
||||
const onInvite = vi.fn();
|
||||
render(
|
||||
<Rule
|
||||
{...defaultProps}
|
||||
href="/create/completed?ruleId=rule-1"
|
||||
ariaLabel="Garden coop"
|
||||
hasBottomLinks
|
||||
bottomLinks={[{ id: "invite", label: "Invite your members", onClick: onInvite }]}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Garden coop" }),
|
||||
).toHaveAttribute("href", "/create/completed?ruleId=rule-1");
|
||||
fireEvent.click(screen.getByRole("button", { name: "Invite your members" }));
|
||||
expect(onInvite).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("applies hover effects correctly", () => {
|
||||
render(<Rule {...defaultProps} />);
|
||||
|
||||
|
||||
Reference in new issue
Block a user