InfluxDB: InfluxQL query editor: generate better HTML (#34467)

pull/34290/head^2
Gábor Farkas 4 years ago committed by GitHub
parent dbe281530c
commit d95cc4a08f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx
  2. 2
      public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/TagsSection.test.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 (
<InlineLabel
as="button"
className={className}
onClick={() => {
setOpen(true);

@ -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();

Loading…
Cancel
Save