diff --git a/e2e/USER_STORIES.md b/e2e/USER_STORIES.md index 9a6263a3..d7bfc83b 100644 --- a/e2e/USER_STORIES.md +++ b/e2e/USER_STORIES.md @@ -1563,15 +1563,14 @@ that I don't have to walk every space to find out. Acceptance: -- The inbox lists each room and conversation with unread activity, naming the - room and space and showing the latest message, newest first. It holds messages - only. +- The inbox lists each room and conversation with unread activity as a card, + naming the room and space and showing the latest message, newest first. It + holds messages only, and only while they are unread. - Activity is a row of one card per space, counting what that space has waiting that isn't a message - threads, events, classifieds and the rest. A card disappears once its space is read. -- A conversation with unread activity carries an unread dot, and "Mark all read" - clears every dot on the page. -- Selecting a conversation opens it, and it stays in the inbox once read. +- A conversation carries an unread dot, and "Mark all read" empties the inbox. +- Selecting a conversation opens it. - Relay health checks are listed alongside the inbox, with the recommendation each one applies. - Hosting is offered whether or not she hosts a space: a shortcut to the hosting diff --git a/e2e/specs/notifications.spec.ts b/e2e/specs/notifications.spec.ts index 5903f869..8a14ad8c 100644 --- a/e2e/specs/notifications.spec.ts +++ b/e2e/specs/notifications.spec.ts @@ -405,17 +405,14 @@ test("US-116 read the home dashboard", async ({seed, as}) => { // Hosting shows even though alice hosts nothing, as an invitation to start a space await expect(page.getByRole("button", {name: "Start a space"})).toBeVisible() + await expect(conversation).toHaveAttribute("href", roomPath(space.url, "general")) + + // The inbox is the badges, so a conversation leaves the list once it has nothing unread await page.getByRole("button", {name: "Mark all read"}).click() - await expect(unreadDot(conversation)).toHaveCount(0) - - // Unlike a conversation, a space's activity card is a count of what's new, so reading it empties + await expect(conversation).toHaveCount(0) await expect(activity).toHaveCount(0) - - // A conversation stays in the inbox once it's read - it's a list of where things are, not a queue - await conversation.click() - - await expect(page).toHaveURL(pattern(roomPath(space.url, "general"))) + await expect(page.getByText("You're all caught up")).toBeVisible() }) test("US-106 share text into the app", async ({seed, as}) => { diff --git a/src/app/components/HomeInbox.svelte b/src/app/components/HomeInbox.svelte index e54ee749..788de973 100644 --- a/src/app/components/HomeInbox.svelte +++ b/src/app/components/HomeInbox.svelte @@ -24,11 +24,17 @@ {/if} {/snippet} - {#if conversations.length === 0} + {#if conversations.length > 0} +
Nothing in your inbox yet
+You're all caught up
- The rooms, space chats and direct messages you belong to show their latest message here. + The rooms, space chats and direct messages you belong to show what's unread here.