ov-components: reorder imports and add toggleStreamPin method for stream pinning functionality

master
Carlos Santos 2025-12-11 11:14:46 +01:00
parent 92511e0535
commit ad80e2b3d3
1 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { By, until, WebDriver, WebElement } from 'selenium-webdriver';
import * as fs from 'fs'; import * as fs from 'fs';
import { PNG } from 'pngjs';
import pixelmatch from 'pixelmatch'; import pixelmatch from 'pixelmatch';
import { PNG } from 'pngjs';
import { By, until, WebDriver, WebElement } from 'selenium-webdriver';
type PNGWithMetadata = PNG & { data: Buffer }; type PNGWithMetadata = PNG & { data: Buffer };
export class OpenViduComponentsPO { export class OpenViduComponentsPO {
@ -287,6 +287,7 @@ export class OpenViduComponentsPO {
async toggleStreamPin(streamSelector: string): Promise<void> { async toggleStreamPin(streamSelector: string): Promise<void> {
const stream = await this.waitForElement(streamSelector); const stream = await this.waitForElement(streamSelector);
await stream.click(); await stream.click();
await this.clickOn('#pin-btn');
await this.browser.sleep(300); await this.browser.sleep(300);
} }