Skip to main content
Version: 3.0.1

STD: Comment Tagging (COMMENTS)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/comments.md Domain: 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 IDTitleACsTestsAC CoverageMethodGaps
REQ-COMMENTS-001Tag Internal Users in Comments6TC-COMMENTS-001, TC-COMMENTS-002, TC-COMMENTS-0036/6 (100%)TM-UINone
REQ-COMMENTS-002Tag External Users by Email5TC-COMMENTS-004, TC-COMMENTS-0055/5 (100%)TM-UINone
REQ-COMMENTS-003Send Email Notifications for Tags6TC-COMMENTS-0066/6 (100%)TM-APINone
REQ-COMMENTS-004Configure Notification Preferences6TC-COMMENTS-007, TC-COMMENTS-0086/6 (100%)TM-HYBNone
REQ-COMMENTS-005Display Notification Indicator4TC-COMMENTS-0094/4 (100%)TM-UINone
REQ-COMMENTS-006Display Notifications List7TC-COMMENTS-010, TC-COMMENTS-0117/7 (100%)TM-UINone
REQ-COMMENTS-007Manage Notification Read Status3TC-COMMENTS-012, TC-COMMENTS-0133/3 (100%)TM-UINone
REQ-COMMENTS-008Mark All Notifications as Read2TC-COMMENTS-0142/2 (100%)TM-UINone
REQ-COMMENTS-009Navigate to Tagged Comments6TC-COMMENTS-015, TC-COMMENTS-016, TC-COMMENTS-0176/6 (100%)TM-UINone
REQ-COMMENTS-010Filter Mentionable Users by Role6TC-COMMENTS-018, TC-COMMENTS-0196/6 (100%)TM-APINone

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:

  1. Navigate to a comment field (Manage Results, Edit Wells, Re-export, or Assay Summary)
  2. Enter the @ symbol in the comment field
  3. Observe user selection interface
  4. Type "Ali" after @
  5. 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

Jira: BT-2668, BT-2669


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:

  1. Use arrow keys to navigate through user list
  2. Press Enter to select highlighted user
  3. Verify user is tagged
  4. Clear comment and repeat with @ symbol
  5. Use mouse to click on a different user
  6. 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:

  1. Navigate to Manage Results for a run
  2. Tag User B in a "reason for selection" comment
  3. Submit the comment
  4. Verify User B receives notification
  5. 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:

  1. Select the option to send invitation by email
  2. Observe email invitation interface
  3. Enter invalid email format (e.g., "notanemail")
  4. Observe submission state
  5. Clear and enter valid email format (e.g., "reviewer@example.com")
  6. 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:

Steps:

  1. Confirm submission of email invitation
  2. Verify email delivery (via mail trap or log inspection)
  3. 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:

  1. Trigger notification by tagging User A in a well-level comment (via API or service call)
  2. Capture outbound email
  3. Inspect email content
  4. Verify email includes direct link
  5. 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:

  1. Navigate to user settings
  2. Locate notification preferences section
  3. Verify available options
  4. Create a new user account
  5. 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:

  1. Tag User A by name in a comment
  2. Verify User A receives in-app notification only (no email)
  3. Tag User B by name in a comment
  4. Verify User B receives email notification only (no in-app)
  5. Use "send by email" option to tag User A (who has in-app only preference)
  6. 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:

  1. Log in with user having zero unread notifications
  2. Observe notification indicator area
  3. Trigger 3 notifications for the user (via another user tagging)
  4. Observe notification indicator
  5. Mark 1 notification as read
  6. Observe indicator count update
  7. Mark all remaining notifications as read
  8. 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:

  1. Access notifications list
  2. Observe notification entries
  3. 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:

  1. Access notifications list
  2. Scroll to bottom of initial notification set
  3. Verify additional notifications load
  4. 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:

  1. Access notifications list
  2. Note the unread status of a notification
  3. Navigate to the notification's linked content
  4. Return to notifications list
  5. 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:

  1. Access notifications list
  2. Observe read/unread status display for each notification
  3. Toggle an unread notification to read
  4. Verify status change
  5. Toggle the same notification back to unread
  6. 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:

  1. Access notifications list
  2. Verify 5 unread notifications exist
  3. Invoke "mark all as read" action
  4. Observe notification statuses
  5. 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:

  1. Access notifications list
  2. Select notification for well-level comment
  3. Navigate to the comment
  4. 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:

  1. Create a comment with a tag
  2. Delete the comment
  3. Access notifications list
  4. Navigate to the deleted comment notification
  5. 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:

  1. Access notifications list
  2. Select notification for Run Notes comment
  3. Verify Assay Summary opens with Run Notes visible and comment positioned
  4. Return to notifications
  5. Select notification for run-level re-export comment
  6. 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:

  1. Query mentionable users API as JUNIOR user
  2. Verify returned user list
  3. Query as SENIOR user
  4. Verify returned user list
  5. Query as MANAGER user
  6. Verify returned user list
  7. Query as SUPER_ADMIN user
  8. Verify returned user list
  9. Query as CLIENT_ADMIN user
  10. 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:

  1. Query mentionable users in Well Comment context
  2. Query mentionable users in Manage Results context
  3. Query mentionable users in Edit Wells context
  4. Query mentionable users in Re-export (run level) context
  5. Query mentionable users in Re-export (well level) context
  6. Query mentionable users in Assay Summary context
  7. 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 CategoryCountCoveredNotes
User Interaction1515Verified via TM-UI
Display/Rendering1212Verified via TM-UI
Backend/Delivery88Verified via TM-API
Configuration66Verified via TM-HYB
Navigation77Verified via TM-UI
Access Control66Verified via TM-API

Deviations

Test CaseExpected MethodActual MethodReason
TC-COMMENTS-016TM-UITM-MANComplex state setup (create then delete comment)

Traceability to Existing Tests

Test CaseJira TestAutomation
TC-COMMENTS-001, TC-COMMENTS-002BT-2668, BT-2669, BT-2670Selenium
TC-COMMENTS-003BT-2634, BT-3321, BT-3347, BT-3361Selenium
TC-COMMENTS-004, TC-COMMENTS-005BT-2671Selenium/Behat
TC-COMMENTS-006PendingPHPUnit
TC-COMMENTS-007, TC-COMMENTS-008BT-2672Behat
TC-COMMENTS-009 through TC-COMMENTS-017PendingSelenium/Manual
TC-COMMENTS-018, TC-COMMENTS-019BT-4826PHPUnit

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