Skip to content

Commit e587a21

Browse files
authored
More Test IDs (#6119)
1 parent dda36df commit e587a21

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ui/packages/shared/profile/src/ProfileMetricsGraph/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,18 @@ const ProfileMetricsGraph = ({
377377
transition={{duration: 0.5}}
378378
>
379379
{isTrimmed ? (
380-
<div className="flex justify-center items-center gap-2">
380+
<div
381+
className="flex justify-center items-center gap-2"
382+
{...testId(TEST_IDS.METRICS_GRAPH_TRIMMED_BANNER)}
383+
>
381384
<span className="text-sm text-amber-800 dark:text-amber-200 bg-amber-100 dark:bg-amber-900 text-center px-2 rounded">
382385
Note: Showing only {afterTrim} of {new Intl.NumberFormat().format(beforeTrim)} series
383386
for performance reasons. Please narrow your query to view more.
384387
</span>
385388
<button
386389
onClick={() => setShowAllSeriesForResponse(response)}
387390
className="text-sm px-1 bg-amber-600 hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600 text-white rounded font-medium transition-colors"
391+
{...testId(TEST_IDS.METRICS_GRAPH_SHOW_ALL_BUTTON)}
388392
>
389393
Show all {new Intl.NumberFormat().format(beforeTrim)}
390394
</button>

ui/packages/shared/test-utils/src/test-ids.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ export const TEST_IDS = {
9696
// Metrics Graph
9797
METRICS_GRAPH: 'metrics-graph',
9898
METRICS_GRAPH_TOOLTIP: 'metrics-graph-tooltip',
99+
METRICS_GRAPH_TRIMMED_BANNER: 'metrics-graph-trimmed-banner',
100+
METRICS_GRAPH_SHOW_ALL_BUTTON: 'metrics-graph-show-all-button',
99101
TOOLTIP_LABEL: 'tooltip-label',
100102
TOOLTIP_LABEL_KEY: 'tooltip-label-key',
101103
TOOLTIP_LABEL_VALUE: 'tooltip-label-value',

0 commit comments

Comments
 (0)