diff --git a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx index aa2d2e3b6b3..cc94d6c288a 100644 --- a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx +++ b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx @@ -176,11 +176,9 @@ export const Seg = ({ const [isOpen, setOpen] = useState(false); if (!isOpen) { const className = cx(defaultButtonClass, buttonClassName); - // this should not be a label, this should be a button, - // but this is what is used inside a Segment, and i just - // want the same look return ( { setOpen(true); diff --git a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/TagsSection.test.tsx b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/TagsSection.test.tsx index 15ea1908771..c276373684a 100644 --- a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/TagsSection.test.tsx +++ b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/TagsSection.test.tsx @@ -31,7 +31,7 @@ async function assertSegmentSelect( callbackValue: unknown ) { // we find the segment - const segs = screen.getAllByText(segmentText, { selector: 'label' }); + const segs = screen.getAllByRole('button', { name: segmentText }); expect(segs.length).toBe(1); const seg = segs[0]; expect(seg).toBeInTheDocument();