test: add webcam fullscreen test
This commit is contained in:
parent
3a7b59c19a
commit
8ff1493d6b
@ -74,6 +74,20 @@ class Webcam extends Page {
|
||||
});
|
||||
}
|
||||
|
||||
async webcamFullscreen() {
|
||||
await this.shareWebcam();
|
||||
// get default viewport sizes
|
||||
const { windowWidth, windowHeight } = await this.page.evaluate(() => { return {
|
||||
windowWidth: window.innerWidth,
|
||||
windowHeight: window.innerHeight,
|
||||
}});
|
||||
await this.waitAndClick(e.webcamFullscreenButton);
|
||||
// get fullscreen webcam size
|
||||
const { width, height } = await this.getLocator('video').boundingBox();
|
||||
await expect(width + 1).toBe(windowWidth); // not sure why there is a difference of 1 pixel
|
||||
await expect(height).toBe(windowHeight);
|
||||
}
|
||||
|
||||
async managingNewBackground() {
|
||||
await this.waitAndClick(e.joinVideo);
|
||||
await this.waitForSelector(e.noneBackgroundButton);
|
||||
|
@ -36,6 +36,12 @@ test.describe.parallel('Webcam @ci', () => {
|
||||
await webcam.changeVideoQuality();
|
||||
});
|
||||
|
||||
test('Webcam fullscreen', async ({ browser, page }) => {
|
||||
const webcam = new Webcam(browser, page);
|
||||
await webcam.init(true, true);
|
||||
await webcam.webcamFullscreen();
|
||||
});
|
||||
|
||||
test.describe('Webcam background', () => {
|
||||
test('Select one of the default backgrounds', async ({ browser, page }) => {
|
||||
const webcam = new Webcam(browser, page);
|
||||
|
Loading…
Reference in New Issue
Block a user