diff --git a/src/AppBar.tsx b/src/AppBar.tsx index d73130177..978ca2e67 100644 --- a/src/AppBar.tsx +++ b/src/AppBar.tsx @@ -84,7 +84,7 @@ export const AppBar: FC = ({ children }) => { > - + {PrimaryButtonIcon ? ( ) : ( diff --git a/src/room/LobbyView.test.tsx b/src/room/LobbyView.test.tsx index a84626dd3..d461ffc22 100644 --- a/src/room/LobbyView.test.tsx +++ b/src/room/LobbyView.test.tsx @@ -130,12 +130,14 @@ describe("LobbyView", () => { // Check that the primary button uses ArrowLeftIcon (the back/return icon), // not the default CollapseIcon const { container: iconContainer } = render(); - const expectedPath = iconContainer.querySelector("path")!.getAttribute("d"); - const primaryButtonPath = container + const expectedSvgPath = iconContainer + .querySelector("path")! + .getAttribute("d"); + const primaryButtonSvgPath = container .querySelector(".leftNav button") ?.querySelector("path") ?.getAttribute("d"); - expect(primaryButtonPath).toBe(expectedPath); + expect(primaryButtonSvgPath).toBe(expectedSvgPath); expect(container).toMatchSnapshot(); expect(await axe(container)).toHaveNoViolations(); });