Query Library: Change test helpers (#106775)

This commit is contained in:
Juan Cabanas
2025-06-19 11:45:59 +00:00
committed by GitHub
parent 8e107fa3b7
commit 7c9867a4dd
2 changed files with 5 additions and 3 deletions
@@ -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);
};