mirror of https://github.com/OpenVidu/openvidu.git
Revert "ov-components: (test) Enhance element counting method to handle timeouts gracefully"
This reverts commit 61a3589dd7
.
master
parent
61a3589dd7
commit
3fc0193260
|
@ -681,8 +681,8 @@ describe('Stream UI controls and interaction features', () => {
|
|||
|
||||
await browser.switchTo().window(tabs[0]);
|
||||
|
||||
await utils.waitForElement('.OV_stream.remote.speaking');
|
||||
expect(await utils.getNumberOfElements('.OV_stream.remote.speaking')).toEqual(1);
|
||||
// Wait for at least one speaking element to appear before asserting
|
||||
expect(await utils.getNumberOfElements('.OV_stream.speaking')).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,13 +15,7 @@ export class OpenViduComponentsPO {
|
|||
);
|
||||
}
|
||||
|
||||
async getNumberOfElements(selector: string, timeout: number = this.TIMEOUT): Promise<number> {
|
||||
try {
|
||||
await this.waitForElement(selector);
|
||||
} catch {
|
||||
// If timeout, return 0 as no elements found
|
||||
return 0;
|
||||
}
|
||||
async getNumberOfElements(selector: string): Promise<number> {
|
||||
return (await this.browser.findElements(By.css(selector))).length;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue