diff --git a/package.json b/package.json index aeb6e368..cd3faa08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "impro", - "version": "0.20.15", + "version": "0.20.16", "type": "module", "scripts": { "start": "rm -rf \"${BUILD_DIR:-build}\" && NODE_ENV=development eleventy --serve", diff --git a/src/css/style.css b/src/css/style.css index 8f40d380..0d0fc0b7 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -3789,6 +3789,12 @@ image-carousel { font-weight: 600; } +@media (hover: hover) { + .notification-profile-link:hover { + text-decoration: underline; + } +} + .chat-main { padding: 0; } diff --git a/src/js/views/notifications.view.js b/src/js/views/notifications.view.js index 8272a249..2cdf644c 100644 --- a/src/js/views/notifications.view.js +++ b/src/js/views/notifications.view.js @@ -273,7 +273,11 @@ export default async function notificationsView({ const displayName = getDisplayName(firstNotif.author); const otherCount = notifications.length - 1; return html`${displayName}${verificationBadgeTemplate({ + >${displayName}${verificationBadgeTemplate({ profile: firstNotif.author, })}${automatedAccountBadgeTemplate({ profile: firstNotif.author, diff --git a/tests/e2e/specs/views/notifications.view.test.js b/tests/e2e/specs/views/notifications.view.test.js index 3cbf2634..23c7cff7 100644 --- a/tests/e2e/specs/views/notifications.view.test.js +++ b/tests/e2e/specs/views/notifications.view.test.js @@ -733,6 +733,43 @@ test.describe("Notifications view", () => { }); }); + test("should navigate to profile when clicking the profile name in a like notification", async ({ + page, + }) => { + const likedPost = createPost({ + uri: "at://did:plc:testuser123/app.bsky.feed.post/navlike2", + text: "Post that was liked", + authorHandle: "testuser.bsky.social", + authorDisplayName: "Test User", + }); + + const mockServer = new MockServer(); + mockServer.addPosts([likedPost]); + mockServer.addProfile(alice); + mockServer.addNotifications([ + createNotification({ + reason: "like", + author: alice, + reasonSubject: likedPost.uri, + indexedAt: new Date().toISOString(), + }), + ]); + await mockServer.setup(page); + + await login(page); + await page.goto("/notifications"); + + const view = page.locator("#notifications-view"); + const item = view.locator(".notification-item"); + await expect(item).toHaveCount(1, { timeout: 10000 }); + await item.locator(".notification-profile-link").click(); + + await expect(page).toHaveURL(/\/profile\/alice\.bsky\.social/); + await expect(page.locator("#profile-view")).toBeVisible({ + timeout: 10000, + }); + }); + test("should navigate to post thread when clicking repost notification", async ({ page, }) => {