mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-02 17:08:32 +00:00
chore: test fixes
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user