diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dc0cbf9c..bfd0b1c67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - `` - `onSelection` now sets `newlySelected` only for add actions and no longer sets it to the last element - border of the BlueprintJS `Tag` elements were fixed +- ` ); expect(screen.getByRole("button").lastChild).toEqual(screen.getByText(/left icon/i)); - expect(container.getElementsByClassName("eccgui-icon").length).toBe(1); + expect(container.getElementsByClassName(`${eccgui}-icon`).length).toBe(1); }); it("should have icon at the right after the text", () => { @@ -31,6 +32,19 @@ describe("Button", () => { ); expect(screen.getByRole("button").firstChild).toEqual(screen.getByText(/right icon/i)); - expect(container.getElementsByClassName("eccgui-icon").length).toBe(1); + expect(container.getElementsByClassName(`${eccgui}-icon`).length).toBe(1); + }); + + it("should render badge markup with correct content when used on an icon button", () => { + const { container } = render(