Skip to content

Commit f1471e3

Browse files
committed
Add test
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 8051bd2 commit f1471e3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/unit-tests/components/views/rooms/EventTile-test.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,24 @@ describe("EventTile", () => {
503503
expect(isHighlighted(container)).toBeFalsy();
504504
});
505505

506-
it(`does not highlight when message's push actions does not have a highlight tweak`, () => {
506+
it("does not highlight when message's push actions does not have a highlight tweak", () => {
507507
mocked(client.getPushActionsForEvent).mockReturnValue({ notify: true, tweaks: {} });
508508
const { container } = getComponent();
509509

510510
expect(isHighlighted(container)).toBeFalsy();
511511
});
512512

513-
it(`highlights when message's push actions have a highlight tweak`, () => {
513+
it("does not highlight when message's push actions have a highlight tweak but message has been redacted", () => {
514+
mocked(client.getPushActionsForEvent).mockReturnValue({
515+
notify: true,
516+
tweaks: { [TweakName.Highlight]: true },
517+
});
518+
const { container } = getComponent({ isRedacted: true });
519+
520+
expect(isHighlighted(container)).toBeFalsy();
521+
});
522+
523+
it("highlights when message's push actions have a highlight tweak", () => {
514524
mocked(client.getPushActionsForEvent).mockReturnValue({
515525
notify: true,
516526
tweaks: { [TweakName.Highlight]: true },

0 commit comments

Comments
 (0)