Change order of test cases

Just moving test cases so that "generic message" ones are grouped at the bottom.

Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
pull/21833/head
Paulo Pinto 2021-08-11 14:51:36 +01:00
parent ca8832f6fa
commit a51b114171
1 changed files with 10 additions and 10 deletions

View File

@ -76,16 +76,6 @@ describe('TextForEvent', () => {
expect(renderComponent(component)).toBe(expectedText); expect(renderComponent(component)).toBe(expectedText);
}); });
it("shows generic text when multiple messages were pinned", () => {
const event = mockPinnedEvent(['message-1', 'message-2', 'message-3'], ['message-1']);
const plainText = textForEvent(event);
const component = renderer.create(textForEvent(event, true));
const expectedText = "@foo:example.com changed the pinned messages for the room.";
expect(plainText).toBe(expectedText);
expect(renderComponent(component)).toBe(expectedText);
});
it("mentions message when a single message was unpinned, with a single message previously pinned", () => { it("mentions message when a single message was unpinned, with a single message previously pinned", () => {
const event = mockPinnedEvent([], ['message-1']); const event = mockPinnedEvent([], ['message-1']);
const plainText = textForEvent(event); const plainText = textForEvent(event);
@ -106,6 +96,16 @@ describe('TextForEvent', () => {
expect(renderComponent(component)).toBe(expectedText); expect(renderComponent(component)).toBe(expectedText);
}); });
it("shows generic text when multiple messages were pinned", () => {
const event = mockPinnedEvent(['message-1', 'message-2', 'message-3'], ['message-1']);
const plainText = textForEvent(event);
const component = renderer.create(textForEvent(event, true));
const expectedText = "@foo:example.com changed the pinned messages for the room.";
expect(plainText).toBe(expectedText);
expect(renderComponent(component)).toBe(expectedText);
});
it("shows generic text when multiple messages were unpinned", () => { it("shows generic text when multiple messages were unpinned", () => {
const event = mockPinnedEvent(['message-3'], ['message-1', 'message-2', 'message-3']); const event = mockPinnedEvent(['message-3'], ['message-1', 'message-2', 'message-3']);
const plainText = textForEvent(event); const plainText = textForEvent(event);