TAC: Order rooms by most recent after notification level (#12329)
* Order room by thread timestamp * Fix key errors in test * Update jest snapshots * Update snapshots * Rename alpha/beta to numbers * Add playwright test
This commit is contained in:
parent
94bd7989b7
commit
e247d31808
7 changed files with 297 additions and 60 deletions
|
@ -35,7 +35,7 @@ test.describe("Threads Activity Centre", () => {
|
|||
await expect(util.getSpacePanel()).toMatchScreenshot("tac-button-expanded.png");
|
||||
});
|
||||
|
||||
test("should not show indicator when there is no thread", async ({ roomAlpha: room1, util }) => {
|
||||
test("should not show indicator when there is no thread", async ({ room1, util }) => {
|
||||
// No indicator should be shown
|
||||
await util.assertNoTacIndicator();
|
||||
|
||||
|
@ -46,11 +46,7 @@ test.describe("Threads Activity Centre", () => {
|
|||
await util.assertNoTacIndicator();
|
||||
});
|
||||
|
||||
test("should show a notification indicator when there is a message in a thread", async ({
|
||||
roomAlpha: room1,
|
||||
util,
|
||||
msg,
|
||||
}) => {
|
||||
test("should show a notification indicator when there is a message in a thread", async ({ room1, util, msg }) => {
|
||||
await util.goTo(room1);
|
||||
await util.receiveMessages(room1, ["Msg1", msg.threadedOff("Msg1", "Resp1")]);
|
||||
|
||||
|
@ -58,11 +54,7 @@ test.describe("Threads Activity Centre", () => {
|
|||
await util.assertNotificationTac();
|
||||
});
|
||||
|
||||
test("should show a highlight indicator when there is a mention in a thread", async ({
|
||||
roomAlpha: room1,
|
||||
util,
|
||||
msg,
|
||||
}) => {
|
||||
test("should show a highlight indicator when there is a mention in a thread", async ({ room1, util, msg }) => {
|
||||
await util.goTo(room1);
|
||||
await util.receiveMessages(room1, [
|
||||
"Msg1",
|
||||
|
@ -80,7 +72,7 @@ test.describe("Threads Activity Centre", () => {
|
|||
await util.assertHighlightIndicator();
|
||||
});
|
||||
|
||||
test("should show the rooms with unread threads", async ({ roomAlpha: room1, roomBeta: room2, util, msg }) => {
|
||||
test("should show the rooms with unread threads", async ({ room1, room2, util, msg }) => {
|
||||
await util.goTo(room2);
|
||||
await util.populateThreads(room1, room2, msg);
|
||||
// The indicator should be shown
|
||||
|
@ -97,7 +89,7 @@ test.describe("Threads Activity Centre", () => {
|
|||
await expect(util.getTacPanel()).toMatchScreenshot("tac-panel-mix-unread.png");
|
||||
});
|
||||
|
||||
test("should update with a thread is read", async ({ roomAlpha: room1, roomBeta: room2, util, msg }) => {
|
||||
test("should update with a thread is read", async ({ room1, room2, util, msg }) => {
|
||||
await util.goTo(room2);
|
||||
await util.populateThreads(room1, room2, msg);
|
||||
|
||||
|
@ -120,6 +112,17 @@ test.describe("Threads Activity Centre", () => {
|
|||
await expect(util.getTacPanel()).toMatchScreenshot("tac-panel-notification-unread.png");
|
||||
});
|
||||
|
||||
test("should order by recency after notification level", async ({ room1, room2, util, msg }) => {
|
||||
await util.goTo(room2);
|
||||
await util.populateThreads(room1, room2, msg, false);
|
||||
|
||||
await util.openTac();
|
||||
await util.assertRoomsInTac([
|
||||
{ room: room1.name, notificationLevel: "notification" },
|
||||
{ room: room2.name, notificationLevel: "notification" },
|
||||
]);
|
||||
});
|
||||
|
||||
test("should block the Spotlight to open when the TAC is opened", async ({ util, page }) => {
|
||||
const toggleSpotlight = () => page.keyboard.press(`${CommandOrControl}+k`);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue