chore: test fixes

This commit is contained in:
Bijin A B
2026-03-21 20:25:48 +05:30
parent dded9278e0
commit 45a0af62fd
11 changed files with 81 additions and 103 deletions

View File

@@ -12,7 +12,7 @@ type WaitForAppReadyOptions = {
* Wait for the Electron app to have a ready, loaded window.
* Handles cases where the first window is slow to appear.
*/
const waitForAppReady = async (
const waitForReadyPage = async (
app: ElectronApplication,
options: WaitForAppReadyOptions = {}
) => {
@@ -59,8 +59,8 @@ const closeAllCollections = async (page) => {
const hasDiscardButton = await page.getByRole('button', { name: 'Discard All and Remove' }).isVisible().catch(() => false);
if (hasDiscardButton) {
// Drafts modal - click "Discard All and Remove"
await page.getByRole('button', { name: 'Discard All and Remove' }).click();
// Drafts modal - click "Discard All and Remove" (force to avoid element stability issues)
await page.getByRole('button', { name: 'Discard All and Remove' }).click({ force: true });
} else {
// Regular modal - click the submit button
await page.locator('.bruno-modal-footer .submit').click();
@@ -1313,7 +1313,7 @@ const openExampleFromSidebar = async (page: Page, requestName: string, exampleNa
};
export {
waitForAppReady,
waitForReadyPage,
closeAllCollections,
openCollection,
createCollection,