diff --git a/public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx b/public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx index 2efdd6a2729..3a3db9e0527 100644 --- a/public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx +++ b/public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx @@ -32,7 +32,7 @@ describe('QueryOperationRow', () => { const onCloseSpy = jest.fn(); setup({ isOpen: false, onOpen: onOpenSpy, onClose: onCloseSpy }); - const queryRow = screen.getByText(/^test-title$/); + const queryRow = screen.getByRole('button', { name: /^test-title$/ }); expect(queryRow).toBeInTheDocument(); // open row on click diff --git a/public/app/core/components/QueryOperationRow/QueryOperationRow.tsx b/public/app/core/components/QueryOperationRow/QueryOperationRow.tsx index 8b901100558..4c7d826940b 100644 --- a/public/app/core/components/QueryOperationRow/QueryOperationRow.tsx +++ b/public/app/core/components/QueryOperationRow/QueryOperationRow.tsx @@ -90,7 +90,6 @@ export function QueryOperationRow({ }, }; - const titleElement = title && ReactUtils.renderOrCallToRender(title, renderPropArgs); const actionsElement = actions && ReactUtils.renderOrCallToRender(actions, renderPropArgs); const headerElementRendered = headerElement && ReactUtils.renderOrCallToRender(headerElement, renderPropArgs); @@ -112,7 +111,7 @@ export function QueryOperationRow({ isContentVisible={isContentVisible} onRowToggle={onRowToggle} reportDragMousePosition={reportDragMousePosition} - titleElement={titleElement} + title={title} /> {isContentVisible &&