STD: Filters (FILTERS)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/filters.mdDomain: FILTERS
Overview
This document specifies tests for the Filters domain, which covers data filtering functionality including text, date, and categorical filter types with real-time and confirmation-based application, dynamic value refinement, and filter state management.
Domain Characteristics:
- Primary function: UI interaction (filter selection, visibility toggle)
- Secondary function: Backend query construction (filter logic, dynamic refinement)
- Configuration dependency: Default visibility, text match mode, debounce timing
Test Method Rationale:
Per Test Plan section 3.3, UI Features domains use TM-UI as primary method. However, FILTERS has significant backend logic (query construction, dynamic refinement, AND combination), so TM-API is used for filter logic verification while TM-UI handles interaction flows. Filter state management and visibility toggle require TM-UI.
Test Case Convention:
Steps describe logical actions, not UI mechanics. Use "Apply text filter with value X" or "Confirm date selection", not "Type X into the filter input field" or "Click the Apply button". This ensures test intent survives UI redesigns.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-FILTERS-001 | Filter Data by Criteria | 18 | TC-FILTERS-001 through TC-FILTERS-010 | 18/18 (100%) | TM-UI, TM-API | None |
Totals: 1 REQ, 18 ACs, 10 Test Cases, 100% Coverage
Test Cases
TC-FILTERS-001: Text filter applies criteria deterministically
Verifies: REQ-FILTERS-001 (AC: filter criteria deterministic, text filter real-time)
Method: TM-UI
Priority: High
Preconditions:
- User logged in with appropriate data access
- Screen with text filter enabled
- Dataset contains records with varied text values
Test Data:
- Records with ID values: "ABC123", "ABC456", "DEF789", "XYZ000"
Steps:
- Navigate to screen with text filter enabled
- Enter "ABC" in text filter
- Observe filtered results
- Clear filter
- Enter same value "ABC" again
- Observe filtered results
Expected Results:
- AC (deterministic): Same filter criteria produces same result set on repeated application
- AC (real-time): Filter applies as text is entered without requiring confirmation action
- AC (filter types): Text filter type is supported
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-002: Text filter matching modes (exact vs prefix)
Verifies: REQ-FILTERS-001 (AC: text matching modes - exact match, prefix match)
Method: TM-API
Priority: High
Preconditions:
- Backend filter endpoint available
- Test data with known values
Test Data:
- Records with values: "ABC123", "ABC456", "XABC789"
Steps:
- Apply text filter with value "ABC" in prefix match mode
- Verify results include records starting with "ABC"
- Apply text filter with value "ABC123" in exact match mode
- Verify results include only exact match
Expected Results:
- AC (prefix match): Prefix mode matches "ABC123" and "ABC456" (starts-with)
- AC (prefix match): Prefix mode excludes "XABC789" (not at start)
- AC (exact match): Exact mode matches only "ABC123" (full equality)
- AC (exact match): Exact mode excludes "ABC456" despite shared prefix
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-003: Multiple filters combine with AND logic
Verifies: REQ-FILTERS-001 (AC: multiple filter criteria combined with AND logic)
Method: TM-UI
Priority: Critical
Preconditions:
- Screen with multiple filter types (text + categorical)
- Dataset with records spanning multiple categories
Test Data:
- Record A: Site="NYC", Status="Complete", Date=2024-01-15
- Record B: Site="NYC", Status="Pending", Date=2024-01-16
- Record C: Site="LAX", Status="Complete", Date=2024-01-15
Steps:
- Navigate to screen with multiple filters
- Verify all 3 records displayed initially
- Apply filter: Site = "NYC"
- Verify 2 records displayed (A, B)
- Apply additional filter: Status = "Complete"
- Verify 1 record displayed (A only)
Expected Results:
- AC (AND logic): Combined filters show only records matching ALL criteria
- AC (AND logic): Record A matches both criteria and is displayed
- AC (AND logic): Record B excluded (does not match Status)
- AC (AND logic): Record C excluded (does not match Site)
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-004: Clear all filters restores unfiltered dataset
Verifies: REQ-FILTERS-001 (AC: clearing all criteria restores unfiltered dataset, bulk clear operation)
Method: TM-UI
Priority: High
Preconditions:
- Screen with multiple active filters
- Known total record count when unfiltered
Test Data:
- Total unfiltered records: 50
- After filter applied: 10 records visible
Steps:
- Navigate to screen with filters
- Verify initial record count (50)
- Apply one or more filter criteria
- Verify filtered count (10)
- Execute bulk clear operation
- Verify record count restored
Expected Results:
- AC (restore unfiltered): After clear, full 50 records displayed
- AC (bulk clear): Single operation clears all active filters
- AC (bulk clear): No filter criteria remain active after clear
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-005: Empty result set indication
Verifies: REQ-FILTERS-001 (AC: empty result set indication)
Method: TM-UI
Priority: Medium
Preconditions:
- Screen with filter enabled
- Dataset with known values
Test Data:
- No records exist matching filter value "ZZZZNOTFOUND"
Steps:
- Navigate to screen with filter
- Apply filter with value that matches no records
- Observe result display
Expected Results:
- AC (empty indication): System indicates empty result set
- AC (empty indication): Filter remains applied (not auto-cleared)
- AC (empty indication): User can modify or clear filter after empty result
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-006: Date filter selection and confirmation
Verifies: REQ-FILTERS-001 (AC: date filter types, single date/range, confirmation required)
Method: TM-UI
Priority: High
Preconditions:
- Screen with date filter enabled
- Records with dates spanning multiple days
Test Data:
- Record A: Date = 2024-01-10
- Record B: Date = 2024-01-15
- Record C: Date = 2024-01-20
Steps:
- Navigate to screen with date filter
- Select single date (2024-01-15)
- Verify filter not yet applied (confirmation required)
- Confirm selection
- Verify only Record B displayed
- Clear date filter
- Select date range (2024-01-10 to 2024-01-15)
- Confirm selection
- Verify Records A and B displayed
Expected Results:
- AC (date filter): Date filter type is supported
- AC (single date): Single date selection filters to exact date
- AC (date range): Contiguous date range includes all dates within range (inclusive)
- AC (confirmation): Date filter applied only upon user confirmation
- AC (confirmation): Pre-confirmation selections do not affect displayed data
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-007: Categorical filter multi-select and confirmation
Verifies: REQ-FILTERS-001 (AC: categorical filter, multi-select, confirmation, select all/clear all)
Method: TM-UI
Priority: High
Preconditions:
- Screen with categorical dropdown filter
- Records with varied categorical values
Test Data:
- Record A: Category = "Alpha"
- Record B: Category = "Beta"
- Record C: Category = "Gamma"
- Record D: Category = "Alpha"
Steps:
- Navigate to screen with categorical filter
- Open categorical filter
- Select "Alpha" and "Beta" values
- Verify filter not yet applied
- Confirm selection
- Verify Records A, B, D displayed (C excluded)
- Use "select all" operation
- Confirm selection
- Verify all records displayed
- Use "clear all" operation within filter
- Confirm (or observe behavior)
Expected Results:
- AC (categorical): Categorical dropdown filter type supported
- AC (multi-select): Multiple values can be selected
- AC (multi-select): Selected values combine with OR logic within single filter
- AC (confirmation): Categorical filter applied only upon confirmation
- AC (select all): Select all operation selects all available values
- AC (clear all): Clear all operation removes all selections
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-008: Dynamic refinement of filter values
Verifies: REQ-FILTERS-001 (AC: dynamic refinement)
Method: TM-API
Priority: High
Preconditions:
- Screen with related filters (e.g., Site -> Mix -> Target hierarchy)
- Data relationships established
Test Data:
- Site "NYC" has Mixes: "Mix-A", "Mix-B"
- Site "LAX" has Mixes: "Mix-C", "Mix-D"
Steps:
- Query available Mix values with no Site filter
- Verify all mixes available (A, B, C, D)
- Apply Site filter = "NYC"
- Query available Mix values again
- Verify only related mixes available
Expected Results:
- AC (dynamic refinement): Available values update based on current selections
- AC (dynamic refinement): With Site="NYC", only Mix-A and Mix-B available
- AC (dynamic refinement): Mix-C and Mix-D excluded (not compatible with NYC)
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-009: Filter state preserved during visibility toggle
Verifies: REQ-FILTERS-001 (AC: filter state preserved, visibility toggleable)
Method: TM-UI
Priority: Medium
Preconditions:
- Screen with collapsible filter section
- Active filter criteria applied
Test Data:
- 50 total records, 10 matching active filter
Steps:
- Navigate to screen with filters
- Apply filter criteria
- Verify 10 filtered records displayed
- Hide filter section (toggle visibility off)
- Verify 10 records still displayed (filter still active)
- Show filter section (toggle visibility on)
- Verify filter state reflects previously applied criteria
Expected Results:
- AC (state preserved): Filter criteria remain active when section hidden
- AC (state preserved): Filtered data continues to display during hidden state
- AC (visibility toggle): Filter section visibility can be toggled
- AC (visibility toggle): Showing section reveals previously applied state
Automation Status: Automated
Jira: BT-2720
TC-FILTERS-010: Error handling - date range validation and timeout
Verifies: REQ-FILTERS-001 (AC: invalid date range prevention, filter timeout error)
Method: TM-HYB
Priority: Medium
Preconditions:
- Screen with date filter
- Ability to simulate slow filter response (for timeout test)
Steps:
- Open date filter
- Attempt to select end date before start date
- Verify system prevents invalid selection
- (Timeout scenario - if testable) Apply filter that triggers timeout
- Verify appropriate error message displayed
Expected Results:
- AC (invalid date range): System prevents selection of end date before start date
- AC (invalid date range): User cannot confirm an invalid date range
- AC (timeout): System displays "Filter operation timed out. Please refine your criteria." on timeout
Automation Status: Partial (Date validation: Automated; Timeout: Manual)
Jira: BT-2720
Deviation: Timeout scenario uses TM-MAN as simulating server timeout requires infrastructure modification. Remediation: Consider adding timeout simulation capability in test environment.
Gap Analysis
No gaps identified. All 18 acceptance criteria have test coverage.
Coverage by AC Category
| AC Category | Count | Covered | Tests |
|---|---|---|---|
| Core Filtering | 4 | 4 | TC-001, TC-003, TC-004, TC-005 |
| Filter Types | 4 | 4 | TC-001, TC-002, TC-006, TC-007 |
| Filter Behavior | 3 | 3 | TC-001, TC-006, TC-007, TC-008 |
| State Management | 3 | 3 | TC-004, TC-009 |
| Convenience Operations | 2 | 2 | TC-006, TC-007 |
| Error Handling | 2 | 2 | TC-010 |
Traceability to Existing Tests
| Test Case | Jira Test | Automation |
|---|---|---|
| TC-FILTERS-001 through TC-FILTERS-010 | BT-2720 | Selenium, PHPUnit |
Notes
- FILTERS is a consolidated domain - the single REQ-FILTERS-001 covers what were originally 7 separate requirements (text exact, text prefix, date, dropdown, dynamic refinement, reset, show/hide)
- Filter behavior is consistent across all screens where filters are enabled; tests should be run on representative screens
- Dynamic refinement (TC-008) is tested at API level for precision; UI verification confirms integration
- Timeout error (TC-010) may require special test infrastructure to trigger reliably