From dbb45eaffdba8c6c407fb003aa5d92cc8991018b Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 26 May 2025 18:24:14 +0200 Subject: [PATCH] ov-components: improve leaveRoom method by adding fallback navigation on error --- openvidu-components-angular/e2e/utils.po.test.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/openvidu-components-angular/e2e/utils.po.test.ts b/openvidu-components-angular/e2e/utils.po.test.ts index fa5718e1..d88bc97d 100644 --- a/openvidu-components-angular/e2e/utils.po.test.ts +++ b/openvidu-components-angular/e2e/utils.po.test.ts @@ -1,4 +1,5 @@ import { By, until, WebDriver, WebElement } from 'selenium-webdriver'; +import { TestAppConfig } from './selenium.conf'; export class OpenViduComponentsPO { private TIMEOUT = 10 * 1000; @@ -166,17 +167,7 @@ export class OpenViduComponentsPO { console.warn(`Warning: ${videoCount} video elements still present after leaving room`); } } catch (error) { - console.error('Error during leaveRoom:', error); - - // Try to reload the page as a fallback - try { - await this.browser.executeScript('window.location.reload()'); - await this.browser.sleep(2000); - } catch (reloadError) { - console.error('Failed to reload page as fallback:', reloadError); - } - - throw error; + this.browser.get(TestAppConfig.appUrl); } }