Fix e2e icon rendering (#31454)

* Fix e2e icon rendering

Regressed by change to compound icons, due to it relying on a hack of rendering icons atop each other to draw a background.

Also fixes a nested tooltip which became annoying during testing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-12-09 11:43:02 +00:00
committed by GitHub
parent 63f269e52c
commit 5324834b47
11 changed files with 306 additions and 255 deletions
@@ -340,7 +340,14 @@ describe("SendWysiwygComposer", () => {
const leftIcon = screen.getByTestId("e2e-icon");
// Then
expect(leftIcon).toBeInTheDocument();
expect(leftIcon).toHaveClass(expectedClass ? `mx_E2EIcon ${expectedClass}` : `mx_E2EIcon`);
expect(leftIcon).toHaveClass("mx_E2EIcon");
if (expectedClass) {
// eslint-disable-next-line jest/no-conditional-expect
expect(leftIcon.querySelector("svg")).toHaveClass(expectedClass);
} else {
// eslint-disable-next-line jest/no-conditional-expect
expect(leftIcon.querySelector("svg")).not.toBeInTheDocument();
}
});
},
);