Merged in fix/broken-tests-show-more-button (pull request #3460)

fix: broken tests due to icon render change

* Fix broken tests due to icon render


Approved-by: Emma Zettervall
This commit is contained in:
Rasmus Langvad
2026-01-20 13:54:40 +00:00
parent 98cd873095
commit 17c78be916

View File

@@ -71,7 +71,7 @@ describe("ShowMoreButton", () => {
renderShowMoreButton({ loadMoreData, showLess: false })
const icon = screen.getByTestId("MaterialIcon")
expect(icon).toBeTruthy()
expect(icon.textContent).toBe("keyboard_arrow_down")
expect(icon.getAttribute("data-icon-name")).toBe("keyboard_arrow_down")
})
it("renders up arrow icon when showLess is true", () => {
@@ -79,7 +79,7 @@ describe("ShowMoreButton", () => {
renderShowMoreButton({ loadMoreData, showLess: true })
const icon = screen.getByTestId("MaterialIcon")
expect(icon).toBeTruthy()
expect(icon.textContent).toBe("keyboard_arrow_up")
expect(icon.getAttribute("data-icon-name")).toBe("keyboard_arrow_up")
})
it("applies custom variant prop", () => {