Query Library: Change test helpers (#106775)

pull/106788/head^2
Juan Cabanas 1 month ago committed by GitHub
parent 8e107fa3b7
commit 7c9867a4dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      public/app/features/explore/spec/helper/interactions.ts
  2. 3
      public/app/features/explore/spec/helper/setup.tsx

@ -43,9 +43,10 @@ export const openQueryLibrary = async () => {
const button = screen.getByRole('button', { name: 'Add query from library' });
await userEvent.click(button);
await waitFor(async () => {
screen.getByRole('dialog', {
name: 'Drawer title Query library',
const container = screen.getByRole('dialog', {
name: /Drawer title/,
});
within(container).getByText('Query library');
});
};

@ -334,7 +334,8 @@ export const withinQueryHistory = () => {
};
export const withinQueryLibrary = () => {
const container = screen.getByRole('dialog', { name: 'Drawer title Query library' });
const container = screen.getByRole('dialog', { name: /Drawer title/ });
within(container).getByText('Query library');
return within(container);
};

Loading…
Cancel
Save