STD: Tables (TABLES)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/tables.mdDomain: TABLES
Overview
This document specifies tests for the Tables domain, which covers reusable table components for displaying, sorting, paginating, and interacting with tabular data across the application.
Domain Characteristics:
- Primary function: UI display and interaction (rendering, selection, visibility)
- Secondary function: Backend logic (sorting, pagination, large export handling)
- Cross-cutting: Used by multiple application screens with context-specific configurations
Test Method Rationale:
Per Test Plan section 3.3, UI Features domains use TM-UI as primary method with TM-MAN fallback. However, TABLES has significant backend logic:
- Sorting logic via
Sortabletrait: TM-API - Pagination via Laravel's
LengthAwarePaginator: TM-API - Large export handling: TM-HYB (API setup + UI verification)
- UI rendering and interaction: TM-UI
Test Case Convention:
Steps describe logical actions, not UI mechanics. Use "Navigate to a page with tabular data" or "Activate column sorting", not "Click the sort icon" or "Click button with class=sort-btn". This ensures test intent survives UI redesigns.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-TABLES-001 | Display Data in Tabular Format | 7 | TC-TABLES-001, TC-TABLES-002, TC-TABLES-003 | 7/7 (100%) | TM-UI | None |
| REQ-TABLES-002 | Sort Table Data by Column | 6 | TC-TABLES-004, TC-TABLES-005, TC-TABLES-006 | 6/6 (100%) | TM-HYB | None |
| REQ-TABLES-003 | Select and Interact with Table Rows | 4 | TC-TABLES-007, TC-TABLES-008 | 4/4 (100%) | TM-UI | None |
| REQ-TABLES-004 | Navigate Paginated Data | 13 | TC-TABLES-009, TC-TABLES-010, TC-TABLES-011, TC-TABLES-012 | 13/13 (100%) | TM-HYB | None |
| REQ-TABLES-005 | Handle Large Data Exports | 10 | TC-TABLES-013, TC-TABLES-014, TC-TABLES-015, TC-TABLES-016 | 10/10 (100%) | TM-HYB | None |
| REQ-TABLES-006 | Configure Column Visibility | 6 | TC-TABLES-017, TC-TABLES-018 | 6/6 (100%) | TM-UI | None |
Totals: 6 REQs, 46 ACs, 18 Test Cases, 100% Coverage
Test Cases
TC-TABLES-001: Table structure and column headers
Verifies: REQ-TABLES-001 (AC1, AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- User logged in with appropriate permissions
- Page with tabular data available
Test Data:
- Table with at least 5 data rows
- Table with grouped column headers (parent spanning multiple child columns)
Steps:
- Navigate to a page with tabular data
- Observe table structure
- Navigate to a table with grouped headers
Expected Results:
- AC1: Data is displayed organized in rows and columns
- AC2: Column headers are visible identifying each data column
- AC3: Grouped headers span multiple child columns where configured
Automation Status: Automated
Jira: BT-2416
TC-TABLES-002: Row state visual differentiation and scrolling
Verifies: REQ-TABLES-001 (AC4, AC5)
Method: TM-UI
Priority: Medium
Preconditions:
- Table with items in different states (e.g., patient wells with exportable/control/warning/error states)
- Table with more rows than visible area
Test Data:
- Table containing wells in various states: exportable (green), control (blue), warning (yellow), error (red)
- Table with 50+ rows in a constrained display area
Steps:
- Navigate to a table with items in different states
- Observe visual differentiation of row states
- Navigate to a table with content exceeding visible area
- Attempt vertical scrolling
Expected Results:
- AC4: Items in different states are visually distinguished (e.g., different background colors)
- AC5: Vertical scrolling is available when content exceeds visible area
Automation Status: Automated
Jira: BT-2416
TC-TABLES-003: Empty state and error handling
Verifies: REQ-TABLES-001 (AC6, AC7)
Method: TM-UI
Priority: High
Preconditions:
- Ability to create empty data conditions
- Ability to simulate data retrieval failure
Test Data:
- Filter criteria that results in no matching data
- Network or server error simulation
Steps:
- Navigate to a table with no data available
- Observe table display
- Simulate a data retrieval failure (e.g., network interruption or server error)
- Observe error handling
Expected Results:
- AC6: When no data exists, column headers are displayed with an indication that no data exists
- AC7: When data retrieval fails, an error message indicates data could not be loaded
Automation Status: Automated
Jira: BT-2416
TC-TABLES-004: Sort indicators display
Verifies: REQ-TABLES-002 (AC1, AC2)
Method: TM-UI
Priority: High
Preconditions:
- Table with sortable and non-sortable columns
- At least one column currently sorted
Test Data:
- Table with: Name (sortable), ID (sortable), Type (non-sortable), Date (sortable)
Steps:
- Navigate to a table with mixed sortable/non-sortable columns
- Observe column headers for sort indicators
- Activate sorting on one sortable column
- Observe sort state indicators
Expected Results:
- AC1: Sortable columns are indicated (e.g., sort icon present)
- AC1: Non-sortable columns show no sort indicator
- AC2: Current sort state is indicated (unsorted, ascending, or descending)
Automation Status: Automated
Jira: BT-2416
TC-TABLES-005: Sort behavior and single-column enforcement
Verifies: REQ-TABLES-002 (AC3, AC4, AC5)
Method: TM-HYB (UI interaction + API verification of data order)
Priority: High
Preconditions:
- Table with at least two sortable columns
- Data with verifiable sort order
Test Data:
- Table with 10 rows: varying Name values (Alpha, Beta, Charlie, etc.)
Steps:
- Navigate to an unsorted table
- Activate sorting on Column A (first activation)
- Verify data order
- Activate sorting on Column A again (second activation)
- Verify data order
- Activate sorting on Column B
- Verify Column A sort is cleared and Column B is sorted ascending
Expected Results:
- AC3: First activation sorts data in ascending order
- AC4: Subsequent activations toggle between ascending and descending
- AC5: Sorting by a new column clears the previous column's sort (single-column sorting enforced)
Automation Status: Automated
Jira: BT-2416
TC-TABLES-006: Date column chronological sorting
Verifies: REQ-TABLES-002 (AC6)
Method: TM-HYB (UI interaction + API verification)
Priority: Medium
Preconditions:
- Table with a sortable date-type column
Test Data:
- Table with dates: 2025-01-01, 2025-03-15, 2025-02-10, 2025-04-20
Steps:
- Navigate to a table with a date column
- Sort by date column ascending
- Verify chronological order (earliest to latest)
- Sort by date column descending
- Verify reverse chronological order (latest to earliest)
Expected Results:
- AC6 (ascending): Rows ordered from earliest to latest date (2025-01-01, 2025-02-10, 2025-03-15, 2025-04-20)
- AC6 (descending): Rows ordered from latest to earliest date (2025-04-20, 2025-03-15, 2025-02-10, 2025-01-01)
Automation Status: Automated
Jira: BT-2416
TC-TABLES-007: Row selection visual feedback
Verifies: REQ-TABLES-003 (AC1, AC2)
Method: TM-UI
Priority: High
Preconditions:
- Table with selectable rows
Test Data:
- Table with 5 rows, all selectable
Steps:
- Navigate to a table with selectable rows
- Interact with a selectable column in Row 1
- Observe visual feedback
- Interact with a selectable column in Row 2
- Observe visual feedback
Expected Results:
- AC1: Selected rows are visually distinguished from unselected rows (e.g., highlighted)
- AC2: Row selection is triggered via interaction with selectable columns
Automation Status: Automated
Jira: BT-2416
TC-TABLES-008: Column-specific actions and permission enforcement
Verifies: REQ-TABLES-003 (AC3, AC4)
Method: TM-UI
Priority: High
Preconditions:
- Table with columns that trigger different actions
- Users with different permission levels
Test Data:
- Table where Column A triggers "View Detail" and Column B triggers "Edit"
- User A: Full permissions
- User B: View-only permissions (no edit)
Steps:
- Log in as User A with full permissions
- Interact with Column A in a row
- Verify "View Detail" action is triggered
- Interact with Column B in the same row
- Verify "Edit" action is triggered
- Log in as User B with limited permissions
- Interact with Column B in a row
- Verify action is denied or not available
Expected Results:
- AC3: Different columns trigger different actions (Column A = View, Column B = Edit)
- AC4: Action availability enforced based on user permissions (User B cannot edit)
Automation Status: Automated
Jira: BT-2416
TC-TABLES-009: Items per page selection
Verifies: REQ-TABLES-004 (AC1, AC2)
Method: TM-HYB (UI interaction + API verification of row count)
Priority: High
Preconditions:
- Table with more than 50 items
Test Data:
- Table with 100 items total
Steps:
- Navigate to a table with 100+ items (default 20 per page)
- Select "10" from items per page options
- Verify table displays exactly 10 items
- Select "30" from items per page options
- Verify table displays exactly 30 items
- Select "50" from items per page options
- Verify table displays exactly 50 items
Expected Results:
- AC1: Items per page options include 10, 20, 30, 50
- AC2: Table display immediately refreshes when items per page changes
Automation Status: Automated
Jira: BT-2416
TC-TABLES-010: Previous and next page navigation
Verifies: REQ-TABLES-004 (AC3, AC4, AC5, AC6)
Method: TM-UI
Priority: High
Preconditions:
- Table with multiple pages
Test Data:
- Table with 100 items, 20 per page (5 pages total)
Steps:
- Navigate to page 1 of 5
- Verify previous-page navigation is disabled
- Activate next-page navigation
- Verify page 2 is displayed
- Continue to page 5 (last page)
- Verify next-page navigation is disabled
- Activate previous-page navigation
- Verify page 4 is displayed
Expected Results:
- AC3: Previous-page navigation is provided
- AC4: Next-page navigation is provided
- AC5: Previous-page navigation is disabled on first page
- AC6: Next-page navigation is disabled on last page
Automation Status: Automated
Jira: BT-2416
TC-TABLES-011: Page indicators and direct page navigation
Verifies: REQ-TABLES-004 (AC7, AC8, AC9, AC10)
Method: TM-UI
Priority: Medium
Preconditions:
- Table with more than 5 pages
Test Data:
- Table with 200 items, 10 per page (20 pages total)
Steps:
- Navigate to page 1 of 20
- Observe page number display
- Verify maximum 5 page number buttons shown
- Verify ellipsis indicator present
- Verify page 1 indicated as current (distinct styling)
- Navigate directly to page 10 using page number navigation
- Verify page 10 is displayed
Expected Results:
- AC7: Current page is indicated (distinct styling)
- AC8: Direct navigation to specific page numbers is available
- AC9: Maximum 5 page number buttons displayed at a time
- AC10: Ellipsis indicator shown when total pages exceed 5 (pattern: 1, 2, 3, ..., 20 or 1, ..., 18, 19, 20)
Automation Status: Automated
Jira: BT-2416
TC-TABLES-012: Direct page input with validation
Verifies: REQ-TABLES-004 (AC11, AC12, AC13)
Method: TM-UI
Priority: Medium
Preconditions:
- Table with multiple pages
Test Data:
- Table with 10 pages total
Steps:
- Navigate to a table with 10 pages
- Enter "5" in direct page input and confirm
- Verify page 5 is displayed
- Enter "15" (invalid - exceeds page count) and attempt confirmation
- Verify navigation is prevented
- Enter "0" and confirm
- Verify page 1 is displayed
- Enter "-3" and confirm
- Verify page 1 is displayed
Expected Results:
- AC11: Direct navigation via page number input is functional (page 5 displayed)
- AC12: Invalid page numbers (15 > 10) are prevented from navigation
- AC13: Zero or negative numbers navigate to page 1
Automation Status: Automated
Jira: BT-2416
TC-TABLES-013: Large export detection and user options
Verifies: REQ-TABLES-005 (AC1, AC2, AC3, AC4, AC5, AC6)
Method: TM-HYB (API for data setup + UI for export flow)
Priority: Critical
Preconditions:
- Table with more than 1000 records
- Export functionality available
Test Data:
- Table with 1500 records
Steps:
- Navigate to a table with 1500 records
- Initiate export operation
- Observe notification
- Verify three options are presented
Expected Results:
- AC1: System detects export exceeds real-time processing limit
- AC2: Synchronous export is limited to prevent timeouts
- AC3: User is notified that data exceeds the real-time export limit (1000 records)
- AC4: Option to proceed with truncated data is offered
- AC5: Option to queue background export for complete data is offered
- AC6: Option to cancel export operation is offered
Automation Status: Automated
Jira: BT-2560
TC-TABLES-014: Truncated export execution
Verifies: REQ-TABLES-005 (AC2)
Method: TM-HYB (UI trigger + file verification)
Priority: High
Preconditions:
- Large dataset export notification displayed
Test Data:
- Table with 1500 records
Steps:
- Trigger export on table with 1500 records
- When notified, select truncated export option
- Verify export completes
- Verify export contains exactly 1000 records
- Verify truncation message is included in export
Expected Results:
- AC2: Export contains exactly 1000 records (truncated) with truncation message
Automation Status: Automated
Jira: BT-2560
TC-TABLES-015: Background export and notification
Verifies: REQ-TABLES-005 (AC7, AC8)
Method: TM-HYB (API for queue verification + UI for notification)
Priority: High
Preconditions:
- User with notification preferences configured (email and/or in-app)
- Large dataset available
Test Data:
- Table with 2000 records
- User with both email and in-app notifications enabled
Steps:
- Trigger export on table with 2000 records
- Select background export option
- Verify user can continue working (not blocked)
- Wait for background export to complete
- Verify notification received per user preferences
Expected Results:
- AC7: User is notified when background export completes
- AC8: Notification sent via configured channels (email, in-app, or both)
Automation Status: Automated
Jira: BT-2560
TC-TABLES-016: Background export failure and error handling
Verifies: REQ-TABLES-005 (AC9, AC10)
Method: TM-HYB (Error injection + UI verification)
Priority: High
Preconditions:
- Ability to simulate background export failure
- User with notifications enabled
Test Data:
- Background export job that will fail (simulated)
Steps:
- Queue a background export
- Simulate export failure (e.g., disk space, timeout, data error)
- Verify user is notified of failure
- Verify retry option is available
- Test synchronous export timeout scenario
- Verify truncation warning displayed
- Verify background export option offered
Expected Results:
- AC9 (failure): User is notified of background export failure with retry option
- AC10 (timeout): Export timeout displays truncation warning and offers background export option
Automation Status: Manual (complex failure simulation)
Jira: BT-2560
Deviation: TM-MAN used instead of TM-HYB due to complexity of failure injection. Remediation: Develop dedicated test harness for export failure scenarios.
TC-TABLES-017: Column visibility configuration access and toggle
Verifies: REQ-TABLES-006 (AC1, AC2, AC3, AC4)
Method: TM-UI
Priority: Medium
Preconditions:
- Table with column visibility configuration feature
Test Data:
- Table with 6 columns: A, B, C, D, E, F (all visible initially)
Steps:
- Navigate to a table with configurable column visibility
- Access column visibility configuration
- Verify all columns listed with current visibility state
- Toggle Column C to hidden
- Toggle Column D to hidden
- Confirm changes
- Verify Columns C and D are no longer visible in table
- Access column visibility configuration again
- Toggle Column C back to visible
- Confirm changes
- Verify Column C is now visible
Expected Results:
- AC1: Column visibility configuration is accessible
- AC2: All columns listed with current visibility state (checked/unchecked)
- AC3: Individual columns can be toggled visible/hidden
- AC4: Visibility changes are applied upon user confirmation
Automation Status: Automated
Jira: BT-2416
TC-TABLES-018: Column visibility cancellation and filter on hidden column
Verifies: REQ-TABLES-006 (AC5, AC6)
Method: TM-UI
Priority: Medium
Preconditions:
- Table with column visibility and filter features
Test Data:
- Table with Column X visible and containing filterable data
Steps:
- Access column visibility configuration
- Toggle Column X to hidden
- Cancel changes (do not confirm)
- Verify Column X remains visible
- Access column visibility configuration
- Toggle Column X to hidden and confirm
- Verify Column X is now hidden
- Apply filter to Column X (via filter controls)
- Verify filter operates correctly on hidden column data
- Verify matching rows are displayed (without Column X visible)
Expected Results:
- AC5: Visibility changes are discarded upon user cancellation
- AC6: Filter functionality operates correctly on hidden columns
Automation Status: Automated
Jira: BT-2416
Gap Analysis
No gaps identified. All 46 acceptance criteria have test coverage.
Coverage by AC Type
| AC Category | Count | Covered | Notes |
|---|---|---|---|
| Display/Rendering | 10 | 10 | Verified via TM-UI |
| Sorting Logic | 6 | 6 | Verified via TM-HYB (API + UI) |
| Interaction/Selection | 6 | 6 | Verified via TM-UI |
| Pagination Controls | 13 | 13 | Verified via TM-UI/TM-HYB |
| Export Handling | 10 | 10 | Verified via TM-HYB |
| Configuration | 6 | 6 | Verified via TM-UI |
Traceability to Existing Tests
| Test Case | Jira Test | Automation |
|---|---|---|
| TC-TABLES-001 to TC-TABLES-012 | BT-2416 | Selenium |
| TC-TABLES-013 to TC-TABLES-016 | BT-2560 | Behat/Manual |
| TC-TABLES-017, TC-TABLES-018 | BT-2416 | Selenium |
Notes
- TABLES is a cross-cutting UI component used by multiple application screens
- Individual table implementations define context-specific behaviors (which columns are sortable, row click actions, etc.)
- Backend sorting logic uses the
Sortabletrait with-prefix convention for descending - Pagination uses Laravel's
LengthAwarePaginatorwith standard metadata - Large export handling follows controller threshold check pattern (1000 records)
- TC-TABLES-016 is the only manual test due to complexity of failure injection