-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Open
Labels
explore:filterRelated to filters in ExploreRelated to filters in Explore
Description
Summary
Add a Playwright E2E test to verify that the time range pre-filter option is hidden when a dataset has no temporal columns.
Background
This test scenario was originally implemented as a Jest/RTL unit test in FiltersConfigModal.test.tsx but was skipped in September 2021 (PR #16906) due to flakiness. After 11 fix attempts, it was determined that this scenario cannot be reliably tested at the unit test level due to:
- The modal architecture requires complex Redux + API mock coordination
showTimeRangePickerdepends onloadedDatasetspopulated by async API fetch during mount- Timing issues between state updates and component rendering create race conditions
The underlying logic is now covered by unit tests for shouldShowTimeRangePicker and hasTemporalColumns in utils.test.ts.
Test Scenario
- Create/edit a filter with a dataset that has no temporal columns (only String, Numeric, Boolean types)
- Open the filter configuration modal
- Navigate to the Settings tab
- Enable the pre-filter checkbox
- Verify: The time range pre-filter option should NOT be shown
Acceptance Criteria
- Playwright test covers the scenario described above
- Test uses a dataset fixture with
column_typescontaining noGenericDataType.Temporal(value 2) - Test is stable and not flaky
Related
- PR refactor(filters): extract shouldShowTimeRangePicker and improve test coverage #36012 - Removed the skipped Jest test
- Original feature: PR feat(native-filters): Hide time filters if loaded datasets don't have temporal columns #15225 (June 2021)
- Original skip: PR fix: Inclusive sign in time range display #16906 (September 2021)
Metadata
Metadata
Assignees
Labels
explore:filterRelated to filters in ExploreRelated to filters in Explore
Type
Projects
Status
Backlog