Skip to content

Commit

Permalink
Address suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrice-acasandrei committed Jan 29, 2025
1 parent 1dcc012 commit d047ca9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/ui/perfherder/legend_card_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const testData = [
signature_id: 1647493,
visible: true,
suite: 'tp5o_webext',
shouldAlert: true,
shouldAlert: null,
alertChangeType: 1,
alertThreshold: 2.0,
},
Expand All @@ -46,6 +46,8 @@ const testData = [
visible: true,
suite: 'tp5o_webext',
shouldAlert: null,
alertChangeType: 1,
alertThreshold: 2.0,
},
];

Expand Down Expand Up @@ -118,7 +120,7 @@ test('legend card displays the shouldAlert value', async () => {

const shouldAlert = await waitFor(() => queryByText('should_alert: true'));
const alertChangeType = await waitFor(() =>
queryByText('alert_change_type: 1'),
queryByText('alert_change_type: absolute'),
);
const alertThreshold = await waitFor(() => queryByText('alert_threshold: 2'));

Expand Down
8 changes: 6 additions & 2 deletions ui/perfherder/graphs/LegendCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,12 @@ const LegendCard = ({
</Button>
)}
<Badge> {framework} </Badge>
<div className="small">{`should_alert: ${series.shouldAlert}`}</div>
<div className="small">{`alert_change_type: ${series.alertChangeType}`}</div>
<div className="small">{`should_alert: ${
series.shouldAlert !== false
}`}</div>
<div className="small">{`alert_change_type: ${
series.alertChangeType === 1 ? 'absolute' : 'percentage'
}`}</div>
<div className="small">{`alert_threshold: ${series.alertThreshold}`}</div>
<div className="small">{`${series.signatureHash.slice(0, 16)}...`}</div>
</div>
Expand Down

0 comments on commit d047ca9

Please sign in to comment.