Skip to content

Commit 4c4eba7

Browse files
committed
docs(tests): add test cases for absolute start dates and bar trimming on time filter change
1 parent c9c309e commit 4c4eba7

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

docs/incident_detection/tests/2.ui_display_flows.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ start,end,alertname,namespace,severity,silenced,labels
109109
- Check the "last updated date" field
110110
- Verify that the format changes without the need to reload the page
111111

112+
### 2.3.2 Incident Bar Trimming on Time Filter Change
113+
**BUG**: When "Last N Days" is shorter than an incident's duration, the bar should be visually trimmed to show only the portion within the selected time window.
114+
**Automation Status**: NOT AUTOMATED
115+
116+
**Background**:
117+
- Incorrect behavior: Changing time filter "squashes" the X-axis to the right while still showing the full incident bar
118+
- Correct behavior: Incident bar is trimmed/clipped to only display the portion that falls within the selected time range
119+
120+
- [ ] **Bar Trimming - Long Incident with Short Filter**: Create an incident spanning 15 days
121+
- With "Last 15 days": Full incident bar visible with correct proportional width
122+
- Set time filter to "Last 7 days"
123+
- Verify the incident bar is trimmed to show only the 7-day portion (not the full 15-day bar)
124+
- Verify the X-axis scale matches the 7-day window (not squashed to the right)
125+
- Verify the bar starts at the left edge of the chart (since incident started before the 7-day window)
126+
127+
- [ ] **Tooltip Accuracy After Trimming**: Hover over a trimmed incident bar
128+
- Verify tooltip shows the actual absolute Start date (which may be before the visible window)
129+
- Verify tooltip shows correct End date
130+
- Verify the displayed duration reflects the full incident, not just the visible portion
131+
112132
### 2.4 Silences labels (Not Automated)
113133
- Verify that information about silences is contained in the alert name
114134
as `NetworkLatencyHigh (silenced)` instead of the additional `silenced=true`

docs/incident_detection/tests/3.api_calls_data_loading_flows.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,27 @@ start,end,alertname,namespace,severity,silenced,labels
8484
- Verify the latest query end time param is within the last 5 minutes
8585

8686

87-
### 3.4 Data Integrity
88-
**NEW, NOT AUTOMATED, TODO COO 1.4**
87+
### 3.4 15-Day Data Loading with "Last N Days" Filtering
88+
**FEATURE**: UI always loads 15 days of data (one query_range call per day), then filters client-side based on "Last N Days" selection.
89+
**Automation Status**: NOT AUTOMATED
90+
91+
**Background**:
92+
- Before: Data was downloaded only for "Last N Days", causing Start dates to be relative to N days
93+
- After: Start displays an absolute date, even when "Last N Days" is shorter than the incident's actual start
94+
- Limit: Start is capped at max 15 days (the maximum supported range)
95+
96+
- [ ] **Absolute Start Date Display**: Create an incident that started 10 days ago
97+
- Set time filter to "Last 7 days"
98+
- Verify incident Start date shows the absolute date (10 days ago), NOT a date relative to 7 days
99+
- Verify the incident bar in the chart is trimmed to show only the portion within the 7-day window
100+
- Verify tooltip shows the actual absolute start time
101+
102+
- [ ] **API Call Pattern Verification**: Monitor network requests on initial page load
103+
- Verify 15 query_range calls are made on initial page load (one per day)
104+
- Verify the time ranges cover the full 15-day window regardless of "Last N Days" selection
105+
106+
### 3.5 Data Integrity
107+
**NEW, NOT AUTOMATED, TODO COO 1.4**
89108
- [ ] Incident grouping by `group_id` works correctly
90109
- [ ] Values deduplicated across multiple time range queries
91110
- [ ] Component lists combined for same group_id

0 commit comments

Comments
 (0)