STD: Comment Tagging (COMMENTS)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/comments.mdDomain: COMMENTS
Overview
This document specifies tests for the Comment Tagging domain, which covers user mentions in comments, notification delivery, preference configuration, and navigation to tagged content.
Domain Characteristics:
- Primary function: User interaction (tagging, navigation, status management)
- Secondary function: Backend notification delivery (email, in-app)
- Configuration dependency: Notification preference settings
- Access control: Role-based filtering of mentionable users
Test Method Rationale: Per Test Plan section 3.3, UI Features domains use TM-UI as primary method. COMMENTS has significant backend logic for notification delivery (email generation, preference enforcement) where TM-API is appropriate, and role-based filtering where TM-API provides faster verification. TM-HYB is used for preference configuration that spans UI and backend verification.
Test Case Convention: Steps describe logical actions, not UI mechanics. Use "Open user selection interface" or "Tag a user in comment", not "Click @ symbol" or "Select from dropdown". This ensures test intent survives UI redesigns.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-COMMENTS-001 | Tag Internal Users in Comments | 6 | TC-COMMENTS-001, TC-COMMENTS-002, TC-COMMENTS-003 | 6/6 (100%) | TM-UI | None |
| REQ-COMMENTS-002 | Tag External Users by Email | 5 | TC-COMMENTS-004, TC-COMMENTS-005 | 5/5 (100%) | TM-UI | None |
| REQ-COMMENTS-003 | Send Email Notifications for Tags | 6 | TC-COMMENTS-006 | 6/6 (100%) | TM-API | None |
| REQ-COMMENTS-004 | Configure Notification Preferences | 6 | TC-COMMENTS-007, TC-COMMENTS-008 | 6/6 (100%) | TM-HYB | None |
| REQ-COMMENTS-005 | Display Notification Indicator | 4 | TC-COMMENTS-009 | 4/4 (100%) | TM-UI | None |
| REQ-COMMENTS-006 | Display Notifications List | 7 | TC-COMMENTS-010, TC-COMMENTS-011 | 7/7 (100%) | TM-UI | None |
| REQ-COMMENTS-007 | Manage Notification Read Status | 3 | TC-COMMENTS-012, TC-COMMENTS-013 | 3/3 (100%) | TM-UI | None |
| REQ-COMMENTS-008 | Mark All Notifications as Read | 2 | TC-COMMENTS-014 | 2/2 (100%) | TM-UI | None |
| REQ-COMMENTS-009 | Navigate to Tagged Comments | 6 | TC-COMMENTS-015, TC-COMMENTS-016, TC-COMMENTS-017 | 6/6 (100%) | TM-UI | None |
| REQ-COMMENTS-010 | Filter Mentionable Users by Role | 6 | TC-COMMENTS-018, TC-COMMENTS-019 | 6/6 (100%) | TM-API | None |
Totals: 10 REQs, 51 ACs, 19 Test Cases, 100% Coverage
Test Cases
TC-COMMENTS-001: User selection interface activation and filtering
Verifies: REQ-COMMENTS-001 (AC1, AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- User logged in with at least Junior User role
- System has multiple registered users with varied names
- User is on a page with comment functionality (any supported location)
Test Data:
- Users: "Alice Anderson", "Alice Brown", "Bob Carter", "Charlie Davis"
Steps:
- Navigate to a comment field (Manage Results, Edit Wells, Re-export, or Assay Summary)
- Enter the @ symbol in the comment field
- Observe user selection interface
- Type "Ali" after @
- Observe filtered results
Expected Results:
- AC1: User selection interface appears when @ symbol is entered
- AC2: All mentionable users matching typed characters are displayed
- AC3: List filters dynamically to show only "Alice Anderson" and "Alice Brown"
Automation Status: Automated
TC-COMMENTS-002: User selection via keyboard and mouse
Verifies: REQ-COMMENTS-001 (AC4, AC5)
Method: TM-UI
Priority: High
Preconditions:
- User selection interface is open with multiple users listed
Steps:
- Use arrow keys to navigate through user list
- Press Enter to select highlighted user
- Verify user is tagged
- Clear comment and repeat with @ symbol
- Use mouse to click on a different user
- Verify user is tagged
Expected Results:
- AC4: Keyboard navigation (up/down arrows) and selection (Enter key) works correctly
- AC5: Mouse selection of users works correctly
Automation Status: Automated
Jira: BT-2670
TC-COMMENTS-003: User tagging triggers notification and supported locations
Verifies: REQ-COMMENTS-001 (AC6, AC7)
Method: TM-UI
Priority: High
Preconditions:
- User A logged in
- User B exists in system with in-app notifications enabled
Test Data:
- Test run with wells available for commenting
Steps:
- Navigate to Manage Results for a run
- Tag User B in a "reason for selection" comment
- Submit the comment
- Verify User B receives notification
- Repeat tagging in each supported location:
- Edit Wells (reason for edit)
- Re-export (run level)
- Re-export (well level)
- Comment action
- Assay Summary (Run Notes)
Expected Results:
- AC6: Notification delivery triggered to tagged user upon comment submission
- AC7: User tagging available in all six supported locations
Automation Status: Automated
Jira: BT-2634, BT-3321, BT-3347, BT-3361
TC-COMMENTS-004: Email invitation interface
Verifies: REQ-COMMENTS-002 (AC1, AC2, AC4, AC5)
Method: TM-UI
Priority: High
Preconditions:
- User selection interface is open
Steps:
- Select the option to send invitation by email
- Observe email invitation interface
- Enter invalid email format (e.g., "notanemail")
- Observe submission state
- Clear and enter valid email format (e.g., "reviewer@example.com")
- Observe submission state
Expected Results:
- AC1: Email invitation option available from user selection interface
- AC2: Interface accepts one email address per invitation
- AC4: Submission disabled with invalid email format
- AC4: Submission enabled with valid email format (Error Handling)
Automation Status: Automated
Jira: BT-2671
TC-COMMENTS-005: Email invitation delivery
Verifies: REQ-COMMENTS-002 (AC3)
Method: TM-UI
Priority: High
Preconditions:
- Email invitation interface open with valid email entered
Test Data:
- External email: "external-reviewer@example.com"
Steps:
- Confirm submission of email invitation
- Verify email delivery (via mail trap or log inspection)
- Verify interface closes after successful submission
Expected Results:
- AC3: Email notification sent to the specified address upon confirmation
Automation Status: Automated
Jira: BT-2671
TC-COMMENTS-006: Email notification content verification
Verifies: REQ-COMMENTS-003 (AC1, AC2, AC3, AC4, AC5, AC6)
Method: TM-API
Priority: High
Preconditions:
- User A exists with email notifications enabled
- Mail trap or email log inspection available
Test Data:
- Run ID: RUN-12345
- Well ID: A1
- Comment text: "Please review this sample result"
- Requesting user: "John Smith"
Steps:
- Trigger notification by tagging User A in a well-level comment (via API or service call)
- Capture outbound email
- Inspect email content
- Verify email includes direct link
- Simulate email delivery failure and verify logging behavior
Expected Results:
- AC1: Email subject identifies requesting user (e.g., "Review request by John Smith in pcr.ai")
- AC2: Email body includes run identifier (RUN-12345)
- AC3: Email body includes well identifier (A1)
- AC4: Email body includes comment text
- AC5: Email body includes link navigating to comment location
- AC6: Email delivery failure is logged (no retry, no user alert)
Automation Status: Automated (Browser)
Jira: Pending
TC-COMMENTS-007: Notification preference options
Verifies: REQ-COMMENTS-004 (AC1, AC2, AC3, AC4)
Method: TM-HYB
Priority: High
Preconditions:
- User with access to settings
Steps:
- Navigate to user settings
- Locate notification preferences section
- Verify available options
- Create a new user account
- Verify default preference setting
Expected Results:
- AC1: In-app notification preference option available
- AC2: Email notification preference option available
- AC3: Combined (Both) notification preference option available
- AC4: Default preference is "Both" for new users
Automation Status: Automated
Jira: BT-2672
TC-COMMENTS-008: Notification preference enforcement
Verifies: REQ-COMMENTS-004 (AC5, AC6)
Method: TM-HYB
Priority: High
Preconditions:
- User A with preference set to "In-app only"
- User B with preference set to "Email only"
Test Data:
- User A: notification_preference = "In-app"
- User B: notification_preference = "Email"
Steps:
- Tag User A by name in a comment
- Verify User A receives in-app notification only (no email)
- Tag User B by name in a comment
- Verify User B receives email notification only (no in-app)
- Use "send by email" option to tag User A (who has in-app only preference)
- Verify User A receives email despite preference setting
Expected Results:
- AC6: Name mention respects recipient's notification preference
- AC5: "Send by email" always delivers email regardless of recipient preference
Automation Status: Automated
Jira: BT-2672
TC-COMMENTS-009: Notification indicator display and updates
Verifies: REQ-COMMENTS-005 (AC1, AC2, AC3, AC4)
Method: TM-UI
Priority: High
Preconditions:
- User with notifications enabled
Test Data:
- Start with 0 unread notifications
Steps:
- Log in with user having zero unread notifications
- Observe notification indicator area
- Trigger 3 notifications for the user (via another user tagging)
- Observe notification indicator
- Mark 1 notification as read
- Observe indicator count update
- Mark all remaining notifications as read
- Observe indicator visibility
Expected Results:
- AC1: Unread notification count displayed
- AC2: Indicator not displayed when count is zero
- AC3: Count persists until notifications are explicitly marked as read
- AC4: Count updates immediately when notifications are marked as read
Automation Status: Automated
Jira: Pending
TC-COMMENTS-010: Notifications list display
Verifies: REQ-COMMENTS-006 (AC1, AC2, AC3, AC4, AC5)
Method: TM-UI
Priority: High
Preconditions:
- User has multiple notifications from different sources
Test Data:
- Notification 1: Run-level comment from User A, timestamp T1
- Notification 2: Well-level comment (Well B2) from User B, timestamp T2
Steps:
- Access notifications list
- Observe notification entries
- Verify display elements for each notification
Expected Results:
- AC1: Each notification displays requesting user's identity
- AC2: Each notification displays timestamp
- AC3: Each notification displays run and well identifiers (when applicable)
- AC4: Each notification displays comment text preview
- AC5: All notifications accessible (not limited to recent)
Automation Status: Automated
Jira: Pending
TC-COMMENTS-011: Notifications list pagination and navigation
Verifies: REQ-COMMENTS-006 (AC6, AC7)
Method: TM-UI
Priority: Medium
Preconditions:
- User has more notifications than fit in single view (e.g., 50+ notifications)
Steps:
- Access notifications list
- Scroll to bottom of initial notification set
- Verify additional notifications load
- Select a notification to navigate to source
Expected Results:
- AC6: Pagination loads additional notifications when scrolling
- AC7: Each notification provides navigation to source comment
Automation Status: Automated
Jira: Pending
TC-COMMENTS-012: Automatic read status on navigation
Verifies: REQ-COMMENTS-007 (AC1)
Method: TM-UI
Priority: High
Preconditions:
- User has at least one unread notification
Steps:
- Access notifications list
- Note the unread status of a notification
- Navigate to the notification's linked content
- Return to notifications list
- Observe the notification status
Expected Results:
- AC1: Notification marked as read after navigating to linked content
Automation Status: Automated
Jira: Pending
TC-COMMENTS-013: Manual read status toggle
Verifies: REQ-COMMENTS-007 (AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- User has notifications in both read and unread states
Steps:
- Access notifications list
- Observe read/unread status display for each notification
- Toggle an unread notification to read
- Verify status change
- Toggle the same notification back to unread
- Verify status change
Expected Results:
- AC2: Each notification displays its current read/unread status
- AC3: Users can toggle notification status between read and unread
Automation Status: Automated
Jira: Pending
TC-COMMENTS-014: Mark all notifications as read
Verifies: REQ-COMMENTS-008 (AC1, AC2)
Method: TM-UI
Priority: Medium
Preconditions:
- User has 5 unread notifications
Steps:
- Access notifications list
- Verify 5 unread notifications exist
- Invoke "mark all as read" action
- Observe notification statuses
- Observe unread count indicator
Expected Results:
- AC1: All notifications marked as read
- AC2: Unread count updates to zero
Automation Status: Automated
Jira: Pending (BT-2742 referenced)
TC-COMMENTS-015: Navigate to well-level comment
Verifies: REQ-COMMENTS-009 (AC1, AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- Notification exists referencing a well-level comment
Test Data:
- Run with Well A1 containing a tagged comment
Steps:
- Access notifications list
- Select notification for well-level comment
- Navigate to the comment
- Observe page state
Expected Results:
- AC1: Referenced comment positioned in visible area
- AC2: Comments section expanded/visible after navigation
- AC3: Navigation works for comments from all supported locations
Automation Status: Automated
Jira: Pending
TC-COMMENTS-016: Navigate to deleted comment
Verifies: REQ-COMMENTS-009 (AC4, AC5)
Method: TM-UI
Priority: Medium
Preconditions:
- Notification exists referencing a comment that has been deleted
Steps:
- Create a comment with a tag
- Delete the comment
- Access notifications list
- Navigate to the deleted comment notification
- Observe the comment display
Expected Results:
- AC4: Deleted comment shown with deletion indicator
- AC5: Deleted comment remains visible with strikethrough formatting
Automation Status: Manual (complex setup)
Jira: Pending
Deviation: TM-MAN used instead of TM-UI due to complex state setup requiring comment creation followed by deletion. Remediation: Consider adding automated fixture for deleted comment state.
TC-COMMENTS-017: Navigate to Run Notes and run-level comments
Verifies: REQ-COMMENTS-009 (AC6, AC7)
Method: TM-UI
Priority: Medium
Preconditions:
- Notification for Run Notes comment
- Notification for run-level re-export comment
Steps:
- Access notifications list
- Select notification for Run Notes comment
- Verify Assay Summary opens with Run Notes visible and comment positioned
- Return to notifications
- Select notification for run-level re-export comment
- Verify Runfile Report page opens
Expected Results:
- AC6: For Run Notes, Assay Summary widget opens with comment positioned in view
- AC7: For run-level re-export, Runfile Report page opens (no specific comment positioning)
Automation Status: Automated
Jira: Pending
TC-COMMENTS-018: Role-based filtering - standard roles
Verifies: REQ-COMMENTS-010 (AC1, AC2, AC3, AC4)
Method: TM-API
Priority: High
Preconditions:
- System has users in all role categories
Test Data:
- SUPER_ADMIN user
- CLIENT_ADMIN user
- MANAGER user
- SENIOR user
- JUNIOR user
Steps:
- Query mentionable users API as JUNIOR user
- Verify returned user list
- Query as SENIOR user
- Verify returned user list
- Query as MANAGER user
- Verify returned user list
- Query as SUPER_ADMIN user
- Verify returned user list
- Query as CLIENT_ADMIN user
- Verify returned user list
Expected Results:
- AC2: JUNIOR can mention MANAGER, SENIOR, and JUNIOR users
- AC3: SENIOR can mention MANAGER, SENIOR, and JUNIOR users
- AC4: MANAGER can mention MANAGER, SENIOR, and JUNIOR users
- AC5: CLIENT_ADMIN cannot mention any users (empty list)
- AC6: SUPER_ADMIN can mention all user roles
Automation Status: Automated
Jira: Pending (BT-4826 referenced)
TC-COMMENTS-019: Role-based filtering consistency across locations
Verifies: REQ-COMMENTS-010 (AC1)
Method: TM-API
Priority: Medium
Preconditions:
- SENIOR user logged in
Steps:
- Query mentionable users in Well Comment context
- Query mentionable users in Manage Results context
- Query mentionable users in Edit Wells context
- Query mentionable users in Re-export (run level) context
- Query mentionable users in Re-export (well level) context
- Query mentionable users in Assay Summary context
- Compare all results
Expected Results:
- AC1: Same users available across all tagging locations (consistent filtering)
Automation Status: Automated (Browser)
Jira: Pending (BT-4826 referenced)
Gap Analysis
No gaps identified. All 51 acceptance criteria have test coverage.
Coverage by AC Type
| AC Category | Count | Covered | Notes |
|---|---|---|---|
| User Interaction | 15 | 15 | Verified via TM-UI |
| Display/Rendering | 12 | 12 | Verified via TM-UI |
| Backend/Delivery | 8 | 8 | Verified via TM-API |
| Configuration | 6 | 6 | Verified via TM-HYB |
| Navigation | 7 | 7 | Verified via TM-UI |
| Access Control | 6 | 6 | Verified via TM-API |
Deviations
| Test Case | Expected Method | Actual Method | Reason |
|---|---|---|---|
| TC-COMMENTS-016 | TM-UI | TM-MAN | Complex state setup (create then delete comment) |
Traceability to Existing Tests
| Test Case | Jira Test | Automation |
|---|---|---|
| TC-COMMENTS-001, TC-COMMENTS-002 | BT-2668, BT-2669, BT-2670 | Selenium |
| TC-COMMENTS-003 | BT-2634, BT-3321, BT-3347, BT-3361 | Selenium |
| TC-COMMENTS-004, TC-COMMENTS-005 | BT-2671 | Selenium/Behat |
| TC-COMMENTS-006 | Pending | PHPUnit |
| TC-COMMENTS-007, TC-COMMENTS-008 | BT-2672 | Behat |
| TC-COMMENTS-009 through TC-COMMENTS-017 | Pending | Selenium/Manual |
| TC-COMMENTS-018, TC-COMMENTS-019 | BT-4826 | PHPUnit |
Notes
- COMMENTS domain is primarily UI-driven but has significant backend components for notification delivery and role-based access control
- Email content verification (TC-COMMENTS-006) uses TM-API for reliable inspection of generated email without UI dependencies
- Role-based filtering (TC-COMMENTS-018, TC-COMMENTS-019) tested at API level for speed and reliability
- Many existing Jira tests (BT-2668, BT-2669, etc.) map directly to acceptance criteria in this STD
- TC-COMMENTS-016 is the only manual test due to complex deleted comment state verification