Revert "frontend: Improve E2EE UI tests by enhancing panel close interactions and timeout handling"
This reverts commit 3cb163deee6c306b52ce0bb6d96d4151a1aa8e6e.
This commit is contained in:
parent
3cb163deee
commit
f77630d1e0
@ -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
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
// ==========================================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user