2023-01-24 01:31:01 +08:00
|
|
|
const { expect } = require('@playwright/test');
|
|
|
|
const e = require('../core/elements');
|
|
|
|
const { MultiUsers } = require('../user/multiusers');
|
|
|
|
|
|
|
|
class FocusOnVideo extends MultiUsers {
|
|
|
|
constructor(browser, context) {
|
|
|
|
super(browser, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
async test() {
|
|
|
|
await this.modPage.shareWebcam();
|
|
|
|
await this.modPage2.shareWebcam();
|
|
|
|
await this.modPage.waitAndClick(e.actions);
|
|
|
|
await this.modPage.waitAndClick(e.layoutSettingsModalButton);
|
|
|
|
await this.modPage.waitAndClick(e.focusOnVideo);
|
|
|
|
await this.modPage.waitAndClick(e.confirmButton);
|
|
|
|
|
2023-04-06 22:43:50 +08:00
|
|
|
const modPageCameraDockLocator = this.modPage.getLocator(e.cameraDock);
|
2023-01-24 01:31:01 +08:00
|
|
|
await expect(this.modPage.page).toHaveScreenshot('moderator1-focus-on-video.png', {
|
|
|
|
maxDiffPixels: 1000,
|
|
|
|
mask: [modPageCameraDockLocator],
|
|
|
|
});
|
|
|
|
|
2023-04-06 22:43:50 +08:00
|
|
|
const modPage2CameraDockLocator = this.modPage2.getLocator(e.cameraDock);
|
2023-01-24 01:31:01 +08:00
|
|
|
await expect(this.modPage2.page).toHaveScreenshot('moderator2-focus-on-video.png', {
|
|
|
|
maxDiffPixels: 1000,
|
|
|
|
mask: [modPage2CameraDockLocator],
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.FocusOnVideo = FocusOnVideo;
|