Skip to main content
Version: 3.0.1

STD: Tables (TABLES)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/tables.md Domain: 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 Sortable trait: 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 IDTitleACsTestsAC CoverageMethodGaps
REQ-TABLES-001Display Data in Tabular Format7TC-TABLES-001, TC-TABLES-002, TC-TABLES-0037/7 (100%)TM-UINone
REQ-TABLES-002Sort Table Data by Column6TC-TABLES-004, TC-TABLES-005, TC-TABLES-0066/6 (100%)TM-HYBNone
REQ-TABLES-003Select and Interact with Table Rows4TC-TABLES-007, TC-TABLES-0084/4 (100%)TM-UINone
REQ-TABLES-004Navigate Paginated Data13TC-TABLES-009, TC-TABLES-010, TC-TABLES-011, TC-TABLES-01213/13 (100%)TM-HYBNone
REQ-TABLES-005Handle Large Data Exports10TC-TABLES-013, TC-TABLES-014, TC-TABLES-015, TC-TABLES-01610/10 (100%)TM-HYBNone
REQ-TABLES-006Configure Column Visibility6TC-TABLES-017, TC-TABLES-0186/6 (100%)TM-UINone

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:

  1. Navigate to a page with tabular data
  2. Observe table structure
  3. 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:

  1. Navigate to a table with items in different states
  2. Observe visual differentiation of row states
  3. Navigate to a table with content exceeding visible area
  4. 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:

  1. Navigate to a table with no data available
  2. Observe table display
  3. Simulate a data retrieval failure (e.g., network interruption or server error)
  4. 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:

  1. Navigate to a table with mixed sortable/non-sortable columns
  2. Observe column headers for sort indicators
  3. Activate sorting on one sortable column
  4. 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:

  1. Navigate to an unsorted table
  2. Activate sorting on Column A (first activation)
  3. Verify data order
  4. Activate sorting on Column A again (second activation)
  5. Verify data order
  6. Activate sorting on Column B
  7. 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:

  1. Navigate to a table with a date column
  2. Sort by date column ascending
  3. Verify chronological order (earliest to latest)
  4. Sort by date column descending
  5. 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:

  1. Navigate to a table with selectable rows
  2. Interact with a selectable column in Row 1
  3. Observe visual feedback
  4. Interact with a selectable column in Row 2
  5. 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:

  1. Log in as User A with full permissions
  2. Interact with Column A in a row
  3. Verify "View Detail" action is triggered
  4. Interact with Column B in the same row
  5. Verify "Edit" action is triggered
  6. Log in as User B with limited permissions
  7. Interact with Column B in a row
  8. 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:

  1. Navigate to a table with 100+ items (default 20 per page)
  2. Select "10" from items per page options
  3. Verify table displays exactly 10 items
  4. Select "30" from items per page options
  5. Verify table displays exactly 30 items
  6. Select "50" from items per page options
  7. 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:

  1. Navigate to page 1 of 5
  2. Verify previous-page navigation is disabled
  3. Activate next-page navigation
  4. Verify page 2 is displayed
  5. Continue to page 5 (last page)
  6. Verify next-page navigation is disabled
  7. Activate previous-page navigation
  8. 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:

  1. Navigate to page 1 of 20
  2. Observe page number display
  3. Verify maximum 5 page number buttons shown
  4. Verify ellipsis indicator present
  5. Verify page 1 indicated as current (distinct styling)
  6. Navigate directly to page 10 using page number navigation
  7. 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:

  1. Navigate to a table with 10 pages
  2. Enter "5" in direct page input and confirm
  3. Verify page 5 is displayed
  4. Enter "15" (invalid - exceeds page count) and attempt confirmation
  5. Verify navigation is prevented
  6. Enter "0" and confirm
  7. Verify page 1 is displayed
  8. Enter "-3" and confirm
  9. 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:

  1. Navigate to a table with 1500 records
  2. Initiate export operation
  3. Observe notification
  4. 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:

  1. Trigger export on table with 1500 records
  2. When notified, select truncated export option
  3. Verify export completes
  4. Verify export contains exactly 1000 records
  5. 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:

  1. Trigger export on table with 2000 records
  2. Select background export option
  3. Verify user can continue working (not blocked)
  4. Wait for background export to complete
  5. 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:

  1. Queue a background export
  2. Simulate export failure (e.g., disk space, timeout, data error)
  3. Verify user is notified of failure
  4. Verify retry option is available
  5. Test synchronous export timeout scenario
  6. Verify truncation warning displayed
  7. 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:

  1. Navigate to a table with configurable column visibility
  2. Access column visibility configuration
  3. Verify all columns listed with current visibility state
  4. Toggle Column C to hidden
  5. Toggle Column D to hidden
  6. Confirm changes
  7. Verify Columns C and D are no longer visible in table
  8. Access column visibility configuration again
  9. Toggle Column C back to visible
  10. Confirm changes
  11. 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:

  1. Access column visibility configuration
  2. Toggle Column X to hidden
  3. Cancel changes (do not confirm)
  4. Verify Column X remains visible
  5. Access column visibility configuration
  6. Toggle Column X to hidden and confirm
  7. Verify Column X is now hidden
  8. Apply filter to Column X (via filter controls)
  9. Verify filter operates correctly on hidden column data
  10. 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 CategoryCountCoveredNotes
Display/Rendering1010Verified via TM-UI
Sorting Logic66Verified via TM-HYB (API + UI)
Interaction/Selection66Verified via TM-UI
Pagination Controls1313Verified via TM-UI/TM-HYB
Export Handling1010Verified via TM-HYB
Configuration66Verified via TM-UI

Traceability to Existing Tests

Test CaseJira TestAutomation
TC-TABLES-001 to TC-TABLES-012BT-2416Selenium
TC-TABLES-013 to TC-TABLES-016BT-2560Behat/Manual
TC-TABLES-017, TC-TABLES-018BT-2416Selenium

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 Sortable trait with - prefix convention for descending
  • Pagination uses Laravel's LengthAwarePaginator with 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