diff --git a/meet-ce/frontend/webcomponent/tests/e2e/e2ee-ui.test.ts b/meet-ce/frontend/webcomponent/tests/e2e/e2ee-ui.test.ts index b302fa2e..30d9f8ec 100644 --- a/meet-ce/frontend/webcomponent/tests/e2e/e2ee-ui.test.ts +++ b/meet-ce/frontend/webcomponent/tests/e2e/e2ee-ui.test.ts @@ -491,23 +491,16 @@ test.describe('E2EE UI Tests', () => { expect(ownName2).toBe(participant2Name); expect(ownName2).not.toContain('*'); - // Close settings panel - click the close button + // Close settings panel await Promise.all([ interactWithElementInIframe(page, '.panel-close-button', { action: 'click' }), interactWithElementInIframe(page2, '.panel-close-button', { action: 'click' }) ]); - - // Wait a moment for the close action to initiate - await page.waitForTimeout(200); - - // Close the more options menu first (this can interfere with panel closing) - await Promise.all([closeMoreOptionsMenu(page), closeMoreOptionsMenu(page2)]); - - // Now wait for the settings panel to be fully hidden await Promise.all([ - waitForElementInIframe(page, 'ov-settings-panel', { state: 'hidden', timeout: 10000 }), - waitForElementInIframe(page2, 'ov-settings-panel', { state: 'hidden', timeout: 10000 }) + waitForElementInIframe(page, 'ov-settings-panel', { state: 'hidden' }), + waitForElementInIframe(page2, 'ov-settings-panel', { state: 'hidden' }) ]); + await Promise.all([closeMoreOptionsMenu(page), closeMoreOptionsMenu(page2)]); // ===== CHECK CHAT MESSAGES ===== // Open chat diff --git a/meet-ce/frontend/webcomponent/tests/helpers/function-helpers.ts b/meet-ce/frontend/webcomponent/tests/helpers/function-helpers.ts index c082e2ba..ed33764c 100644 --- a/meet-ce/frontend/webcomponent/tests/helpers/function-helpers.ts +++ b/meet-ce/frontend/webcomponent/tests/helpers/function-helpers.ts @@ -468,23 +468,12 @@ export const openMoreOptionsMenu = async (page: Page) => { await waitForElementInIframe(page, '#toolbar', { state: 'visible' }); // Open more options menu await interactWithElementInIframe(page, '#more-options-btn', { action: 'click' }); - await waitForElementInIframe(page, '#more-options-menu', { state: 'visible', timeout: 5000 }); - await page.waitForTimeout(300); // Wait for menu animation to complete + await page.waitForTimeout(500); // Wait for menu animation }; export const closeMoreOptionsMenu = async (page: Page) => { - // Check if the menu is still visible before trying to close - const frameLocator = await getIframeInShadowDom(page); - const menu = frameLocator.locator('#more-options-menu'); - const menuVisible = await menu.isVisible().catch(() => false); - - if (menuVisible) { - // Click outside the menu to close it (using a safe click area) - await interactWithElementInIframe(page, 'body', { action: 'click' }); - // Wait for menu to be hidden with a timeout - await waitForElementInIframe(page, '#more-options-menu', { state: 'hidden', timeout: 5000 }); - await page.waitForTimeout(300); // Wait for close animation - } + await interactWithElementInIframe(page, 'body', { action: 'click' }); + await page.waitForTimeout(500); // Wait for menu to close }; // ==========================================