{
[styles.viewExpanded]: isDetailExpanded,
[styles.viewExpandedAndMatchingFilter]: isMatchingFilter && isDetailExpanded,
})}
- data-test-id="span-view"
+ data-testid="span-view"
style={{ cursor: 'pointer' }}
width={1 - columnDivision}
onClick={this._detailToggle}
diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanLinks.tsx b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanLinks.tsx
index 27fbf1cc3fd..875c9bc2604 100644
--- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanLinks.tsx
+++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanLinks.tsx
@@ -78,7 +78,7 @@ export const SpanLinksMenu = ({ links }: SpanLinksProps) => {
const closeMenu = () => setIsMenuOpen(false);
return (
- <>
+
);
};
diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js
index b0c69b9570e..58383f7e2b0 100644
--- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js
+++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js
@@ -56,13 +56,13 @@ describe('SpanTreeOffset', () => {
wrapper = shallow()
.dive()
.dive();
- const indentGuides = wrapper.find('[data-test-id="SpanTreeOffset--indentGuide"]');
+ const indentGuides = wrapper.find('[data-testid="SpanTreeOffset--indentGuide"]');
expect(indentGuides.length).toBe(1);
expect(indentGuides.prop('data-ancestor-id')).toBe(specialRootID);
});
it('renders one .SpanTreeOffset--indentGuide per ancestor span, plus one for entire trace', () => {
- const indentGuides = wrapper.find('[data-test-id="SpanTreeOffset--indentGuide"]');
+ const indentGuides = wrapper.find('[data-testid="SpanTreeOffset--indentGuide"]');
expect(indentGuides.length).toBe(3);
expect(indentGuides.at(0).prop('data-ancestor-id')).toBe(specialRootID);
expect(indentGuides.at(1).prop('data-ancestor-id')).toBe(rootSpanID);
@@ -140,13 +140,13 @@ describe('SpanTreeOffset', () => {
});
it('calls props.addHoverIndentGuideId on mouse enter', () => {
- wrapper.find('[data-test-id="icon-wrapper"]').simulate('mouseenter', {});
+ wrapper.find('[data-testid="icon-wrapper"]').simulate('mouseenter', {});
expect(props.addHoverIndentGuideId).toHaveBeenCalledTimes(1);
expect(props.addHoverIndentGuideId).toHaveBeenCalledWith(ownSpanID);
});
it('calls props.removeHoverIndentGuideId on mouse leave', () => {
- wrapper.find('[data-test-id="icon-wrapper"]').simulate('mouseleave', {});
+ wrapper.find('[data-testid="icon-wrapper"]').simulate('mouseleave', {});
expect(props.removeHoverIndentGuideId).toHaveBeenCalledTimes(1);
expect(props.removeHoverIndentGuideId).toHaveBeenCalledWith(ownSpanID);
});
diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.tsx b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.tsx
index 5dbc6d8aee6..cc08a5e6c22 100644
--- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.tsx
+++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.tsx
@@ -149,7 +149,7 @@ export class UnthemedSpanTreeOffset extends React.PureComponent {
[styles.indentGuideActive]: this.props.hoverIndentGuideIds.has(ancestorId),
})}
data-ancestor-id={ancestorId}
- data-test-id="SpanTreeOffset--indentGuide"
+ data-testid="SpanTreeOffset--indentGuide"
onMouseEnter={(event) => this.handleMouseEnter(event, ancestorId)}
onMouseLeave={(event) => this.handleMouseLeave(event, ancestorId)}
/>
@@ -159,7 +159,7 @@ export class UnthemedSpanTreeOffset extends React.PureComponent {
className={styles.iconWrapper}
onMouseEnter={(event) => this.handleMouseEnter(event, spanID)}
onMouseLeave={(event) => this.handleMouseLeave(event, spanID)}
- data-test-id="icon-wrapper"
+ data-testid="icon-wrapper"
>
{icon}
diff --git a/public/app/features/explore/TraceView/TraceView.test.tsx b/public/app/features/explore/TraceView/TraceView.test.tsx
index 6f805b5ef8a..ac817dddce0 100644
--- a/public/app/features/explore/TraceView/TraceView.test.tsx
+++ b/public/app/features/explore/TraceView/TraceView.test.tsx
@@ -93,7 +93,7 @@ describe('TraceView', () => {
it('toggles detailState', async () => {
renderTraceViewNew();
expect(screen.queryByText(/Tags/)).toBeFalsy();
- const spanView = screen.getAllByText('', { selector: 'div[data-test-id="span-view"]' })[0];
+ const spanView = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[0];
await userEvent.click(spanView);
expect(screen.queryByText(/Tags/)).toBeTruthy();
@@ -114,23 +114,23 @@ describe('TraceView', () => {
it('correctly shows processes for each span', async () => {
renderTraceView();
let table: HTMLElement;
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
- const firstSpan = screen.getAllByText('', { selector: 'div[data-test-id="span-view"]' })[0];
+ const firstSpan = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[0];
await userEvent.click(firstSpan);
await userEvent.click(screen.getByText(/Process/));
table = screen.getByText('', { selector: 'div[data-test-id="KeyValueTable"]' });
expect(table.innerHTML).toContain('client-uuid-1');
await userEvent.click(firstSpan);
- const secondSpan = screen.getAllByText('', { selector: 'div[data-test-id="span-view"]' })[1];
+ const secondSpan = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[1];
await userEvent.click(secondSpan);
await userEvent.click(screen.getByText(/Process/));
table = screen.getByText('', { selector: 'div[data-test-id="KeyValueTable"]' });
expect(table.innerHTML).toContain('client-uuid-2');
await userEvent.click(secondSpan);
- const thirdSpan = screen.getAllByText('', { selector: 'div[data-test-id="span-view"]' })[2];
+ const thirdSpan = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[2];
await userEvent.click(thirdSpan);
await userEvent.click(screen.getByText(/Process/));
table = screen.getByText('', { selector: 'div[data-test-id="KeyValueTable"]' });
@@ -139,7 +139,7 @@ describe('TraceView', () => {
it('resets detail view for new trace with the identical spanID', async () => {
const { rerender } = render(getTraceView([frameOld]));
- const span = screen.getAllByText('', { selector: 'div[data-test-id="span-view"]' })[2];
+ const span = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[2];
await userEvent.click(span);
//Process is in detail view
expect(screen.getByText(/Process/)).toBeInTheDocument();
diff --git a/public/app/features/explore/TraceView/TraceViewContainer.test.tsx b/public/app/features/explore/TraceView/TraceViewContainer.test.tsx
index 959420ad7c2..19ea70aee5d 100644
--- a/public/app/features/explore/TraceView/TraceViewContainer.test.tsx
+++ b/public/app/features/explore/TraceView/TraceViewContainer.test.tsx
@@ -42,37 +42,37 @@ function renderTraceViewContainer(frames = [frameOld]) {
describe('TraceViewContainer', () => {
it('toggles children visibility', async () => {
renderTraceViewContainer();
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
- await userEvent.click(screen.getAllByText('', { selector: 'span[data-test-id="SpanTreeOffset--indentGuide"]' })[0]);
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(1);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
+ await userEvent.click(screen.getAllByText('', { selector: 'span[data-testid="SpanTreeOffset--indentGuide"]' })[0]);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(1);
- await userEvent.click(screen.getAllByText('', { selector: 'span[data-test-id="SpanTreeOffset--indentGuide"]' })[0]);
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
+ await userEvent.click(screen.getAllByText('', { selector: 'span[data-testid="SpanTreeOffset--indentGuide"]' })[0]);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
});
it('toggles collapses and expands one level of spans', async () => {
renderTraceViewContainer();
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
await userEvent.click(screen.getByLabelText('Collapse +1'));
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(2);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(2);
await userEvent.click(screen.getByLabelText('Expand +1'));
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
});
it('toggles collapses and expands all levels', async () => {
renderTraceViewContainer();
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
await userEvent.click(screen.getByLabelText('Collapse All'));
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(1);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(1);
await userEvent.click(screen.getByLabelText('Expand All'));
- expect(screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' }).length).toBe(3);
+ expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
});
it('searches for spans', async () => {
renderTraceViewContainer();
await userEvent.type(screen.getByPlaceholderText('Find...'), '1ed38015486087ca');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[0].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[0].parentNode! as HTMLElement).className
).toContain('rowMatchingFilter');
});
@@ -86,32 +86,32 @@ describe('TraceViewContainer', () => {
await userEvent.click(nextResultButton);
expect(suffix.textContent).toBe('1 of 2');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[1].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[1].parentNode! as HTMLElement).className
).toContain('rowFocused');
await userEvent.click(nextResultButton);
expect(suffix.textContent).toBe('2 of 2');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[2].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[2].parentNode! as HTMLElement).className
).toContain('rowFocused');
await userEvent.click(nextResultButton);
expect(suffix.textContent).toBe('1 of 2');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[1].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[1].parentNode! as HTMLElement).className
).toContain('rowFocused');
await userEvent.click(prevResultButton);
expect(suffix.textContent).toBe('2 of 2');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[2].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[2].parentNode! as HTMLElement).className
).toContain('rowFocused');
await userEvent.click(prevResultButton);
expect(suffix.textContent).toBe('1 of 2');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[1].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[1].parentNode! as HTMLElement).className
).toContain('rowFocused');
await userEvent.click(prevResultButton);
expect(suffix.textContent).toBe('2 of 2');
expect(
- (screen.queryAllByText('', { selector: 'div[data-test-id="span-view"]' })[2].parentNode! as HTMLElement).className
+ (screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' })[2].parentNode! as HTMLElement).className
).toContain('rowFocused');
});
});