2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-14 06:31:27 +00:00

Tweak playwright tests (#9027)

This commit is contained in:
Oliver
2025-02-04 22:52:01 +11:00
committed by GitHub
parent 445fa45394
commit e1f25a03d4
2 changed files with 13 additions and 14 deletions

View File

@@ -81,3 +81,13 @@ export const navigate = async (page, url: string) => {
await page.goto(url, { waitUntil: 'domcontentloaded' });
};
/**
* Perform a 'global search' on the provided page, for the provided query text
*/
export const globalSearch = async (page, query) => {
await page.getByLabel('open-search').click();
await page.getByLabel('global-search-input').clear();
await page.getByPlaceholder('Enter search text').fill(query);
await page.waitForTimeout(300);
};