tests: add 'being mentioned' notification e2e tests#1639
tests: add 'being mentioned' notification e2e tests#1639
Conversation
…ned in a post' notification e2e
🚀 Preview DeploymentURL: https://franky-preview-pr-1639-fzxmjul7ya-oa.a.run.app
|
Greptile SummaryThis PR implements and enables the Confidence Score: 5/5Safe to merge — test-only changes with a minimal, additive component attribute addition. All changes are confined to Cypress E2E tests and a single non-breaking data-cy attribute. No production logic is altered, no P0/P1 issues were found, and the implementation closely mirrors existing patterns in the codebase. No files require special attention.
|
| Filename | Overview |
|---|---|
| cypress/e2e/notifications.cy.ts | Implements the pending mention-notification test and adds a correctly-skipped disabled-notification variant; profile3 fixture and beforeEach alias follow existing patterns. |
| cypress/support/posts.ts | Adds createQuickPostWithMention helper that mirrors the existing createQuickPost pattern, including cy.intercept placement inside .within(). |
| src/components/molecules/MentionPopover/MentionPopover.tsx | Adds data-cy="mention-popover" attribute alongside the existing data-testid to support Cypress targeting; no logic change. |
Sequence Diagram
sequenceDiagram
participant P1 as Profile 1
participant App as App (Pubky)
participant P2 as Profile 2
P1->>App: createQuickPostWithMention(profile2.username)
App-->>P1: PUT /posts/** 201
P2->>App: sign in
P2->>App: check notification counter (expects 1)
P2->>App: navigate to profile page (resets counter to 0)
P2->>App: verify latest notification: "mentioned you in post" (Unread)
P2->>App: causeNotificationsToBeRead()
P2->>App: verify latest notification: "mentioned you in post" (Read)
Reviews (1): Last reviewed commit: "tests: update snapshot" | Re-trigger Greptile
This PR introduces tests for both enabled and disabled notification settings when profile is mentioned.
Disabled is skipped due to bug #1603