Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/react-components/specs/dropdown.browser.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe("Dropdown", () => {
expect(dropdown.element().getAttribute("style")).toContain("--width: 500px");
await dropdown.click();
expect(popover.element().getAttribute("open")).toBe("true");
expect(popoverDiv.element().getAttribute("style")).toContain("width: min(500px, 100%)");
expect(popoverDiv.element().getAttribute("style")).toContain("500px");
})
});

Expand Down
3 changes: 1 addition & 2 deletions libs/web-components/src/components/dropdown/Dropdown.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { cleanup, fireEvent, render, waitFor } from "@testing-library/svelte";
import GoADropdown from "./Dropdown.svelte";
import GoADropdownWrapper from "./DropdownWrapper.test.svelte";
import { describe, it } from "vitest";
import { tick } from "svelte";
import userEvent from "@testing-library/user-event";
import type { UserEvent } from "@testing-library/user-event/dist/types/setup/setup";

Expand Down Expand Up @@ -1185,7 +1184,7 @@ describe("GoADropdown", () => {

await waitFor(() => {
const popover = result.container.querySelector("goa-popover");
expect(popover?.getAttribute("width")).toBe("min(300px, 100%)");
expect(popover?.getAttribute("width")).toBe("300px");
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
if (width?.includes("%") || maxwidth?.includes("%")) {
_popoverMaxWidth = "100%"; // let the parent's % width constraint handle it
} else {
_popoverMaxWidth = `min(${_width}, 100%)`;
_popoverMaxWidth = _width;
}
}

Expand Down