Skip to main content
Version: 3.0.0

STD: Filters (FILTERS)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/filters.md Domain: 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 IDTitleACsTestsAC CoverageMethodGaps
REQ-FILTERS-001Filter Data by Criteria18TC-FILTERS-001 through TC-FILTERS-01018/18 (100%)TM-UI, TM-APINone

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:

  1. Navigate to screen with text filter enabled
  2. Enter "ABC" in text filter
  3. Observe filtered results
  4. Clear filter
  5. Enter same value "ABC" again
  6. 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:

  1. Apply text filter with value "ABC" in prefix match mode
  2. Verify results include records starting with "ABC"
  3. Apply text filter with value "ABC123" in exact match mode
  4. 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:

  1. Navigate to screen with multiple filters
  2. Verify all 3 records displayed initially
  3. Apply filter: Site = "NYC"
  4. Verify 2 records displayed (A, B)
  5. Apply additional filter: Status = "Complete"
  6. 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:

  1. Navigate to screen with filters
  2. Verify initial record count (50)
  3. Apply one or more filter criteria
  4. Verify filtered count (10)
  5. Execute bulk clear operation
  6. 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:

  1. Navigate to screen with filter
  2. Apply filter with value that matches no records
  3. 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:

  1. Navigate to screen with date filter
  2. Select single date (2024-01-15)
  3. Verify filter not yet applied (confirmation required)
  4. Confirm selection
  5. Verify only Record B displayed
  6. Clear date filter
  7. Select date range (2024-01-10 to 2024-01-15)
  8. Confirm selection
  9. 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:

  1. Navigate to screen with categorical filter
  2. Open categorical filter
  3. Select "Alpha" and "Beta" values
  4. Verify filter not yet applied
  5. Confirm selection
  6. Verify Records A, B, D displayed (C excluded)
  7. Use "select all" operation
  8. Confirm selection
  9. Verify all records displayed
  10. Use "clear all" operation within filter
  11. 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:

  1. Query available Mix values with no Site filter
  2. Verify all mixes available (A, B, C, D)
  3. Apply Site filter = "NYC"
  4. Query available Mix values again
  5. 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:

  1. Navigate to screen with filters
  2. Apply filter criteria
  3. Verify 10 filtered records displayed
  4. Hide filter section (toggle visibility off)
  5. Verify 10 records still displayed (filter still active)
  6. Show filter section (toggle visibility on)
  7. 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:

  1. Open date filter
  2. Attempt to select end date before start date
  3. Verify system prevents invalid selection
  4. (Timeout scenario - if testable) Apply filter that triggers timeout
  5. 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 CategoryCountCoveredTests
Core Filtering44TC-001, TC-003, TC-004, TC-005
Filter Types44TC-001, TC-002, TC-006, TC-007
Filter Behavior33TC-001, TC-006, TC-007, TC-008
State Management33TC-004, TC-009
Convenience Operations22TC-006, TC-007
Error Handling22TC-010

Traceability to Existing Tests

Test CaseJira TestAutomation
TC-FILTERS-001 through TC-FILTERS-010BT-2720Selenium, 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