backport disable self-view test (#20982)

This commit is contained in:
Gabriel Luiz Porfirio 2024-08-21 14:56:21 -03:00 committed by GitHub
parent 3dd588d704
commit 7a8abd0127
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 24 additions and 0 deletions

View File

@ -447,6 +447,7 @@ exports.dropAreaLeft = 'div[data-test="dropArea-contentLeft"]';
exports.dropAreaRight = 'div[data-test="dropArea-contentRight"]'; exports.dropAreaRight = 'div[data-test="dropArea-contentRight"]';
exports.dropAreaTop = 'div[data-test="dropArea-contentTop"]'; exports.dropAreaTop = 'div[data-test="dropArea-contentTop"]';
exports.dropAreaSidebarBottom = 'div[data-test="dropArea-sidebarContentBottom"]'; exports.dropAreaSidebarBottom = 'div[data-test="dropArea-sidebarContentBottom"]';
exports.selfViewDisableBtn = 'li[data-test="selfViewDisableBtn"]';
exports.videoQualitySelector = 'select[id="setQuality"]'; exports.videoQualitySelector = 'select[id="setQuality"]';
exports.webcamItemTalkingUser = 'div[data-test="webcamItemTalkingUser"]'; exports.webcamItemTalkingUser = 'div[data-test="webcamItemTalkingUser"]';

View File

@ -86,6 +86,23 @@ class Webcam extends Page {
await expect(height).toBe(windowHeight); await expect(height).toBe(windowHeight);
} }
async disableSelfView() {
await this.waitAndClick(e.joinVideo);
await this.waitForSelector(e.noneBackgroundButton);
await uploadBackgroundVideoImage(this);
await this.waitAndClick(e.selectCustomBackground);
await sleep(1000);
await this.waitAndClick(e.startSharingWebcam);
await this.waitForSelector(e.webcamContainer);
await this.waitAndClick(e.dropdownWebcamButton);
await this.waitAndClick(e.selfViewDisableBtn);
const webcamVideoLocator = await this.getLocator(e.webcamConnecting);
await expect(webcamVideoLocator).toHaveScreenshot('disable-self-view.png');
}
async managingNewBackground() { async managingNewBackground() {
await this.waitAndClick(e.joinVideo); await this.waitAndClick(e.joinVideo);
await this.waitForSelector(e.noneBackgroundButton); await this.waitForSelector(e.noneBackgroundButton);

View File

@ -42,6 +42,12 @@ test.describe.parallel('Webcam', () => {
await webcam.webcamFullscreen(); await webcam.webcamFullscreen();
}); });
test('Disable Self-view @ci', async ({ browser, page }) => {
const webcam = new Webcam(browser, page);
await webcam.init(true, true);
await webcam.disableSelfView();
});
test.describe('Webcam background @ci', () => { test.describe('Webcam background @ci', () => {
/* this test has the flaky tag because it is breaking due to a default video from chrome that /* this test has the flaky tag because it is breaking due to a default video from chrome that
is overlapping the virtual background. */ is overlapping the virtual background. */

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB