From 26fc359933554be9b21f20c0e2fafe07c54adf91 Mon Sep 17 00:00:00 2001 From: Andre Pereira Date: Fri, 5 May 2023 15:51:13 +0100 Subject: [PATCH] Trace View: Rename span detail attribute sections (#67849) * Rename span detail attribute sections * Fix tests * Fix more tests --- public/app/features/explore/TraceView/TraceView.test.tsx | 8 ++++---- .../TraceTimelineViewer/SpanDetail/index.test.tsx | 4 ++-- .../components/TraceTimelineViewer/SpanDetail/index.tsx | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/app/features/explore/TraceView/TraceView.test.tsx b/public/app/features/explore/TraceView/TraceView.test.tsx index ddb7338155c..6287620f49e 100644 --- a/public/app/features/explore/TraceView/TraceView.test.tsx +++ b/public/app/features/explore/TraceView/TraceView.test.tsx @@ -91,14 +91,14 @@ describe('TraceView', () => { it('toggles detailState', async () => { renderTraceViewNew(); - expect(screen.queryByText(/Attributes/)).toBeFalsy(); + expect(screen.queryByText(/Span Attributes/)).toBeFalsy(); const spanView = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[0]; await userEvent.click(spanView); - expect(screen.queryByText(/Attributes/)).toBeTruthy(); + expect(screen.queryByText(/Span Attributes/)).toBeTruthy(); await userEvent.click(spanView); - screen.debug(screen.queryAllByText(/Attributes/)); - expect(screen.queryByText(/Attributes/)).toBeFalsy(); + screen.debug(screen.queryAllByText(/Span Attributes/)); + expect(screen.queryByText(/Span Attributes/)).toBeFalsy(); }); it('shows timeline ticks', () => { diff --git a/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.test.tsx b/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.test.tsx index 260ec358c33..ece47433797 100644 --- a/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.test.tsx +++ b/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.test.tsx @@ -144,13 +144,13 @@ describe('', () => { it('renders the span tags', async () => { render(); - await userEvent.click(screen.getByRole('switch', { name: /Attributes/ })); + await userEvent.click(screen.getByRole('switch', { name: /Span Attributes/ })); expect(props.tagsToggle).toHaveBeenLastCalledWith(span.spanID); }); it('renders the process tags', async () => { render(); - await userEvent.click(screen.getByRole('switch', { name: /Resource/ })); + await userEvent.click(screen.getByRole('switch', { name: /Resource Attributes/ })); expect(props.processToggle).toHaveBeenLastCalledWith(span.spanID); }); diff --git a/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.tsx b/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.tsx index f11a77dc230..cac62dc44c0 100644 --- a/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.tsx +++ b/public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.tsx @@ -250,7 +250,7 @@ export default function SpanDetail(props: SpanDetailProps) {
tagsToggle(spanID)} @@ -259,7 +259,7 @@ export default function SpanDetail(props: SpanDetailProps) { processToggle(spanID)}