Skip to content

Commit ec6d60f

Browse files
committed
tweaks button text
Signed-off-by: Yulong Ruan <[email protected]>
1 parent 2016ae9 commit ec6d60f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

public/components/incontext_insight/generate_popover_body.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ describe('GeneratePopoverBody', () => {
144144
);
145145

146146
// insight button is visible
147-
const insightButton = screen.getAllByText('View insight')[0];
147+
const insightButton = screen.getAllByText('View insights')[0];
148148
expect(insightButton).toBeInTheDocument();
149149

150-
// 2. Click insight button to view insight
150+
// 2. Click insight button to view insights
151151
fireEvent.click(insightButton);
152152
// title is back button + 'Insight With RAG'
153153
let backButton = getByLabelText('back-to-summary');
@@ -224,7 +224,7 @@ describe('GeneratePopoverBody', () => {
224224
);
225225

226226
// insight button is not visible
227-
expect(screen.queryAllByLabelText('View insight')).toHaveLength(0);
227+
expect(screen.queryAllByLabelText('View insights')).toHaveLength(0);
228228
// Only call http post 1 time.
229229
expect(mockPost).toHaveBeenCalledTimes(1);
230230
});
@@ -286,7 +286,7 @@ describe('GeneratePopoverBody', () => {
286286
// Show summary content although insight generation failed
287287
expect(getByText('Generated summary content')).toBeInTheDocument();
288288
// insight button is not visible for this alert
289-
expect(screen.queryAllByLabelText('View insight')).toHaveLength(0);
289+
expect(screen.queryAllByLabelText('View insights')).toHaveLength(0);
290290
});
291291

292292
it('should not display discover link if monitor type is not query_level_monitor or bucket_level_monitor', async () => {

public/components/incontext_insight/generate_popover_body.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const GeneratePopoverBody: React.FC<{
345345
defaultMessage: 'Back to summary',
346346
})
347347
: i18n.translate('assistantDashboards.incontextInsight.viewInsight', {
348-
defaultMessage: 'View insight',
348+
defaultMessage: 'View insights',
349349
})}
350350
</TraceButton>
351351
)}

0 commit comments

Comments
 (0)