-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate bug bash tests involving dominant speakers, pinning, and spotlight #5173
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
8dccbd1
Automate dominant speaker, pinning, and spotlight tests
mgamis-msft 1ca459e
changelogs
mgamis-msft 59737eb
lint fix
mgamis-msft 14b6270
lint fix
mgamis-msft a76fa9f
remove test.only
mgamis-msft 9c3fcb5
remove helper unused function
mgamis-msft 5e7a76a
Update packages/react-components browser test snapshots
github-actions[bot] 7b009bf
Update packages/react-components browser test snapshots
github-actions[bot] dbf4b6b
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] 6b76fcd
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] 3a753a6
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] ec00a72
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] 79fa775
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] e790432
Merge branch 'main' into mgamis/automate-bug-bash-tests-phase-1
mgamis-msft f6df5fb
Merge branch 'main' into mgamis/automate-bug-bash-tests-phase-1
mgamis-msft cb12357
Update packages/react-components browser test snapshots
github-actions[bot] f22cb31
Update packages/react-components browser test snapshots
github-actions[bot] beef4e7
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] b6092f0
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] 87f8ebe
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] ffcb31a
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] f367cc3
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] fc733a4
Update packages/react-components browser test snapshots
github-actions[bot] c2a3c94
lint fixes
mgamis-msft b1f955b
Merge branch 'main' into mgamis/automate-bug-bash-tests-phase-1
mgamis-msft 3bb8667
Update packages/react-components browser test snapshots
github-actions[bot] 4b1000c
Update packages/react-components browser test snapshots
github-actions[bot] dc9e631
Update packages/react-components browser test snapshots
github-actions[bot] 2fe7bd3
Merge branch 'mgamis/automate-bug-bash-tests-phase-1' of https://gith…
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
change-beta/@azure-communication-react-6a26b83a-cf4b-44d0-ac74-87df7146f917.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "patch", | ||
"area": "improvement", | ||
"workstream": "Automated tests", | ||
"comment": "Automate dominant speaker, pinning, and spotlight tests", | ||
"packageName": "@azure/communication-react", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
9 changes: 9 additions & 0 deletions
9
change/@azure-communication-react-6a26b83a-cf4b-44d0-ac74-87df7146f917.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "patch", | ||
"area": "improvement", | ||
"workstream": "Automated tests", | ||
"comment": "Automate dominant speaker, pinning, and spotlight tests", | ||
"packageName": "@azure/communication-react", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
packages/react-components/tests/browser/VideoGallery.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import React from 'react'; | ||
import { test, expect } from '@playwright/experimental-ct-react'; | ||
import { VideoGallery } from '../../src/components/VideoGallery'; | ||
import { VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../../src'; | ||
import { Stack } from '@fluentui/react'; | ||
|
||
test.describe('VGL - VideoGallery tests', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.evaluate(() => document.fonts.ready); | ||
}); | ||
|
||
test('VideoGallery with only audio participants and dominant speakers', async ({ mount }) => { | ||
const localParticipant: VideoGalleryLocalParticipant = { userId: 'test' }; | ||
const remoteParticipants: VideoGalleryRemoteParticipant[] = Array.from({ length: 10 }, (_, i) => i + 1).map( | ||
(i) => ({ | ||
userId: `${i}`, | ||
displayName: `${i}` | ||
}) | ||
); | ||
const component = await mount( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-1-1-videogallery-with-audio-only-before-dominant-speakers.png'); | ||
await component.update( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
dominantSpeakers={['10']} | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-1-2-videogallery-with-audio-only-after-dominant-speakers.png'); | ||
}); | ||
|
||
test('VideoGallery with video participants and dominant speakers', async ({ mount }) => { | ||
const localParticipant: VideoGalleryLocalParticipant = { userId: 'test' }; | ||
const remoteParticipants: VideoGalleryRemoteParticipant[] = Array.from({ length: 10 }, (_, i) => i + 1).map( | ||
(i) => ({ | ||
userId: `${i}`, | ||
displayName: `${i}` | ||
}) | ||
); | ||
// Assign video stream to some participants | ||
remoteParticipants[1].videoStream = { isAvailable: true }; | ||
remoteParticipants[2].videoStream = { isAvailable: true }; | ||
remoteParticipants[4].videoStream = { isAvailable: true }; | ||
remoteParticipants[6].videoStream = { isAvailable: true }; | ||
remoteParticipants[8].videoStream = { isAvailable: true }; | ||
|
||
const component = await mount( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-2-1-videogallery-with-some-video-before-dominant-speakers.png'); | ||
await component.update( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
dominantSpeakers={['9']} | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-2-2-videogallery--with-some-video-after-dominant-speakers.png'); | ||
}); | ||
|
||
test('VideoGallery with screen share on and dominant speakers', async ({ mount }) => { | ||
const localParticipant: VideoGalleryLocalParticipant = { userId: 'test' }; | ||
const remoteParticipants: VideoGalleryRemoteParticipant[] = Array.from({ length: 10 }, (_, i) => i + 1).map( | ||
(i) => ({ | ||
userId: `${i}`, | ||
displayName: `${i}` | ||
}) | ||
); | ||
remoteParticipants[5].isScreenSharingOn = true; | ||
remoteParticipants[5].screenShareStream = { isAvailable: true }; | ||
const component = await mount( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-3-1-videogallery-with-screen-share-before-dominant-speakers.png'); | ||
await component.update( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
dominantSpeakers={['10']} | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-3-2-videogallery-with-screen-share-after-dominant-speakers.png'); | ||
}); | ||
|
||
test('VideoGallery spotlight participant test', async ({ mount }) => { | ||
const localParticipant: VideoGalleryLocalParticipant = { userId: 'test' }; | ||
const remoteParticipants: VideoGalleryRemoteParticipant[] = Array.from({ length: 10 }, (_, i) => i + 1).map( | ||
(i) => ({ userId: `${i}`, displayName: `${i}` }) | ||
); | ||
const screenSharingParticipant: VideoGalleryRemoteParticipant = { | ||
userId: '11', | ||
displayName: '11' | ||
}; | ||
remoteParticipants.push(screenSharingParticipant); | ||
const component = await mount( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-4-1-videogallery-before-spotlight.png'); | ||
remoteParticipants[7].spotlight = { spotlightedOrderPosition: 1 }; | ||
component.update( | ||
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}> | ||
<VideoGallery | ||
localParticipant={localParticipant} | ||
remoteParticipants={remoteParticipants} | ||
layout="floatingLocalVideo" | ||
spotlightedParticipants={['8']} | ||
/> | ||
</Stack> | ||
); | ||
await expect(component).toHaveScreenshot('VGL-4-2-videogallery-after-spotlight.png'); | ||
}); | ||
}); |
Binary file modified
BIN
-5 Bytes
(100%)
...it-box-empty-html-content-without-attachment-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.1 KB
...-videogallery-with-audio-only-before-dominant-speakers-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
...ery-with-audio-only-before-dominant-speakers-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17 KB
...lery-with-audio-only-before-dominant-speakers-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.1 KB
...2-videogallery-with-audio-only-after-dominant-speakers-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.8 KB
...lery-with-audio-only-after-dominant-speakers-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.7 KB
...llery-with-audio-only-after-dominant-speakers-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.6 KB
...-videogallery-with-some-video-before-dominant-speakers-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.9 KB
...ery-with-some-video-before-dominant-speakers-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.2 KB
...lery-with-some-video-before-dominant-speakers-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.7 KB
...-videogallery--with-some-video-after-dominant-speakers-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.9 KB
...ery--with-some-video-after-dominant-speakers-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.5 KB
...lery--with-some-video-after-dominant-speakers-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.1 KB
...ideogallery-with-screen-share-before-dominant-speakers-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.17 KB
...y-with-screen-share-before-dominant-speakers-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.52 KB
...ry-with-screen-share-before-dominant-speakers-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.2 KB
...videogallery-with-screen-share-after-dominant-speakers-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.87 KB
...ry-with-screen-share-after-dominant-speakers-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.45 KB
...ery-with-screen-share-after-dominant-speakers-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.5 KB
...ec.tsx-snapshots/VGL-4-1-videogallery-before-spotlight-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.1 KB
...pshots/VGL-4-1-videogallery-before-spotlight-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.2 KB
...apshots/VGL-4-1-videogallery-before-spotlight-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.2 KB
...pec.tsx-snapshots/VGL-4-2-videogallery-after-spotlight-Desktop-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.7 KB
...apshots/VGL-4-2-videogallery-after-spotlight-Mobile-Android-Landscape-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.3 KB
...napshots/VGL-4-2-videogallery-after-spotlight-Mobile-Android-Portrait-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.1 KB
...-videogallery-with-audio-only-before-dominant-speakers-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...ery-with-audio-only-before-dominant-speakers-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+17 KB
...lery-with-audio-only-before-dominant-speakers-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+29.1 KB
...2-videogallery-with-audio-only-after-dominant-speakers-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.8 KB
...lery-with-audio-only-after-dominant-speakers-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.7 KB
...llery-with-audio-only-after-dominant-speakers-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.6 KB
...-videogallery-with-some-video-before-dominant-speakers-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+10.9 KB
...ery-with-some-video-before-dominant-speakers-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.2 KB
...lery-with-some-video-before-dominant-speakers-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+29.7 KB
...-videogallery--with-some-video-after-dominant-speakers-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.9 KB
...ery--with-some-video-after-dominant-speakers-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.5 KB
...lery--with-some-video-after-dominant-speakers-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.1 KB
...ideogallery-with-screen-share-before-dominant-speakers-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.17 KB
...y-with-screen-share-before-dominant-speakers-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.52 KB
...ry-with-screen-share-before-dominant-speakers-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.2 KB
...videogallery-with-screen-share-after-dominant-speakers-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.87 KB
...ry-with-screen-share-after-dominant-speakers-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.45 KB
...ery-with-screen-share-after-dominant-speakers-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+29.5 KB
...ec.tsx-snapshots/VGL-4-1-videogallery-before-spotlight-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...pshots/VGL-4-1-videogallery-before-spotlight-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+18.2 KB
...apshots/VGL-4-1-videogallery-before-spotlight-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+19.2 KB
...pec.tsx-snapshots/VGL-4-2-videogallery-after-spotlight-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.7 KB
...apshots/VGL-4-2-videogallery-after-spotlight-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.3 KB
...napshots/VGL-4-2-videogallery-after-spotlight-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
176 changes: 176 additions & 0 deletions
176
packages/react-composites/tests/browser/call/hermetic/Pinning.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { | ||
addVideoStream, | ||
buildUrlWithMockAdapter, | ||
defaultMockCallAdapterState, | ||
defaultMockRemoteParticipant, | ||
test | ||
} from './fixture'; | ||
import { expect } from '@playwright/test'; | ||
import { dataUiId, waitForSelector, stableScreenshot, isTestProfileMobile, pageClick } from '../../common/utils'; | ||
import { IDS } from '../../common/constants'; | ||
|
||
const displayNames = [ | ||
'Tony Hawk', | ||
'Marie Curie', | ||
'Gal Gadot', | ||
'Margaret Atwood', | ||
'Kobe Bryant', | ||
"Conan O'Brien", | ||
'Paul Bridges', | ||
'Fiona Harper', | ||
'Reina Takizawa', | ||
'Vasily Podkolzin', | ||
'Antonie van Leeuwenhoek', | ||
'Luciana Rodriguez' | ||
]; | ||
|
||
test.describe('PIN - Pinning tests', async () => { | ||
test('Pin and unpin remote participants via video tile', async ({ page, serverUrl }, testInfo) => { | ||
const participants = displayNames.map((name) => defaultMockRemoteParticipant(name)); | ||
if (participants[1]) { | ||
addVideoStream(participants[1], true); | ||
} | ||
const initialState = defaultMockCallAdapterState(participants); | ||
|
||
await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { newControlBarExperience: 'true' })); | ||
const videoGallery = await waitForSelector(page, dataUiId(IDS.videoGallery)); | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-1-1-pin-video-tile-before.png'); | ||
|
||
const isMobile = isTestProfileMobile(testInfo); | ||
if (isMobile) { | ||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=2`); | ||
await videoTile.dispatchEvent('touchstart'); | ||
await pageClick(page, 'div[role="menu"] >> text=Pin for me'); | ||
} else { | ||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=2`); | ||
await videoTile.hover(); | ||
const moreButton = await videoTile.waitForSelector(dataUiId(IDS.videoTileMoreOptionsButton)); | ||
await moreButton.hover(); | ||
await moreButton.click(); | ||
await waitForSelector(page, dataUiId('video-tile-pin-participant-button')); | ||
await pageClick(page, dataUiId('video-tile-pin-participant-button')); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-1-2-pin-video-tile-after.png'); | ||
|
||
if (isMobile) { | ||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=1`); | ||
await videoTile.dispatchEvent('touchstart'); | ||
await page.waitForSelector(dataUiId('drawer-menu')); | ||
} else { | ||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=1`); | ||
await videoTile.hover(); | ||
const moreButton = await videoTile?.waitForSelector(dataUiId(IDS.videoTileMoreOptionsButton)); | ||
await moreButton?.hover(); | ||
await moreButton?.click(); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-1-3-unpin-video-tile-before.png'); | ||
|
||
if (isMobile) { | ||
await pageClick(page, 'div[role="menu"] >> text=Unpin'); | ||
} else { | ||
await pageClick(page, dataUiId('video-tile-unpin-participant-button')); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-1-4-unpin-video-tile-after.png'); | ||
}); | ||
|
||
test('Pin and unpin remote participants via participant item', async ({ page, serverUrl }, testInfo) => { | ||
const participants = displayNames.map((name) => defaultMockRemoteParticipant(name)); | ||
if (participants[1]) { | ||
addVideoStream(participants[1], true); | ||
} | ||
const initialState = defaultMockCallAdapterState(participants); | ||
|
||
await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { newControlBarExperience: 'true' })); | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-2-1-pin-participant-item-before.png'); | ||
|
||
const isMobile = isTestProfileMobile(testInfo); | ||
if (isMobile) { | ||
await pageClick(page, dataUiId('common-call-composite-more-button')); | ||
const drawerPeopleMenuDiv = await page.$('div[role="menu"] >> text=People'); | ||
await drawerPeopleMenuDiv?.click(); | ||
await pageClick(page, dataUiId('participant-item')); | ||
await pageClick(page, 'div[role="menu"] >> text=Pin for me'); | ||
await pageClick(page, 'button[aria-label="Back"]'); | ||
} else { | ||
await pageClick(page, dataUiId('common-call-composite-people-button')); | ||
const participantItem = await page.waitForSelector(dataUiId('participant-item')); | ||
await participantItem.hover(); | ||
await pageClick(page, dataUiId(IDS.participantItemMenuButton)); | ||
await pageClick(page, dataUiId('participant-item-pin-participant-button')); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-2-2-pin-participant-item-after.png'); | ||
|
||
if (isMobile) { | ||
await pageClick(page, dataUiId('common-call-composite-more-button')); | ||
const drawerPeopleMenuDiv = await page.$('div[role="menu"] >> text=People'); | ||
await drawerPeopleMenuDiv?.click(); | ||
await pageClick(page, dataUiId('participant-item')); | ||
} else { | ||
const participantItem = await page.waitForSelector(dataUiId('participant-item')); | ||
await participantItem.hover(); | ||
await pageClick(page, dataUiId(IDS.participantItemMenuButton)); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-2-3-unpin-participant-item-before.png'); | ||
|
||
if (isMobile) { | ||
await pageClick(page, 'div[role="menu"] >> text=Unpin'); | ||
await pageClick(page, 'button[aria-label="Back"]'); | ||
} else { | ||
await pageClick(page, dataUiId('participant-item-unpin-participant-button')); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-2-4-unpin-participant-item-after.png'); | ||
}); | ||
|
||
test('Pin max remote participants', async ({ page, serverUrl }, testInfo) => { | ||
const participants = displayNames.map((name) => defaultMockRemoteParticipant(name)); | ||
if (participants[1]) { | ||
addVideoStream(participants[1], true); | ||
} | ||
const initialState = defaultMockCallAdapterState(participants); | ||
|
||
await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { newControlBarExperience: 'true' })); | ||
const videoGallery = await waitForSelector(page, dataUiId(IDS.videoGallery)); | ||
|
||
const isMobile = isTestProfileMobile(testInfo); | ||
if (isMobile) { | ||
for (let i = 0; i < 4; i++) { | ||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=-1`); | ||
await videoTile.dispatchEvent('touchstart'); | ||
await pageClick(page, 'div[role="menu"] >> text=Pin for me'); | ||
} | ||
|
||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=-1`); | ||
await videoTile.dispatchEvent('touchstart'); | ||
await page.waitForSelector(dataUiId('drawer-menu')); | ||
} else { | ||
for (let i = 0; i < 4; i++) { | ||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=-1`); | ||
await videoTile.hover(); | ||
const moreButton = await videoTile.waitForSelector(dataUiId(IDS.videoTileMoreOptionsButton)); | ||
await moreButton.hover(); | ||
await moreButton.click(); | ||
await waitForSelector(page, dataUiId('video-tile-pin-participant-button')); | ||
await pageClick(page, dataUiId('video-tile-pin-participant-button')); | ||
} | ||
|
||
const videoTile = await videoGallery.waitForSelector(dataUiId(IDS.videoTile) + ` >> nth=-1`); | ||
await videoTile.hover(); | ||
const moreButton = await videoTile?.waitForSelector(dataUiId(IDS.videoTileMoreOptionsButton)); | ||
await moreButton?.hover(); | ||
await moreButton?.click(); | ||
} | ||
|
||
expect(await stableScreenshot(page)).toMatchSnapshot('PIN-3-1-pin-max-tiles.png'); | ||
}); | ||
}); |
Binary file added
BIN
+28.5 KB
...inning.test.ts-snapshots/PIN-1-1-pin-video-tile-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
...t.ts-snapshots/PIN-1-1-pin-video-tile-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+48.8 KB
...st.ts-snapshots/PIN-1-1-pin-video-tile-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+30.6 KB
...Pinning.test.ts-snapshots/PIN-1-2-pin-video-tile-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.3 KB
...st.ts-snapshots/PIN-1-2-pin-video-tile-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...est.ts-snapshots/PIN-1-2-pin-video-tile-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.1 KB
...ning.test.ts-snapshots/PIN-1-3-unpin-video-tile-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.6 KB
...ts-snapshots/PIN-1-3-unpin-video-tile-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+43.3 KB
....ts-snapshots/PIN-1-3-unpin-video-tile-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.4 KB
...nning.test.ts-snapshots/PIN-1-4-unpin-video-tile-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
....ts-snapshots/PIN-1-4-unpin-video-tile-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+49.2 KB
...t.ts-snapshots/PIN-1-4-unpin-video-tile-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.5 KB
....test.ts-snapshots/PIN-2-1-pin-participant-item-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
...napshots/PIN-2-1-pin-participant-item-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+48.8 KB
...snapshots/PIN-2-1-pin-participant-item-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+64.2 KB
...g.test.ts-snapshots/PIN-2-2-pin-participant-item-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.4 KB
...snapshots/PIN-2-2-pin-participant-item-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+60.2 KB
...-snapshots/PIN-2-2-pin-participant-item-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+68.9 KB
...est.ts-snapshots/PIN-2-3-unpin-participant-item-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+41 KB
...pshots/PIN-2-3-unpin-participant-item-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+123 KB
...apshots/PIN-2-3-unpin-participant-item-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+59.2 KB
...test.ts-snapshots/PIN-2-4-unpin-participant-item-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
...apshots/PIN-2-4-unpin-participant-item-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+48.8 KB
...napshots/PIN-2-4-unpin-participant-item-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+46.4 KB
...rmetic/Pinning.test.ts-snapshots/PIN-3-1-pin-max-tiles-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+38.4 KB
...ning.test.ts-snapshots/PIN-3-1-pin-max-tiles-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+78.1 KB
...nning.test.ts-snapshots/PIN-3-1-pin-max-tiles-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.5 KB
...inning.test.ts-snapshots/PIN-1-1-pin-video-tile-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
...t.ts-snapshots/PIN-1-1-pin-video-tile-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+48.8 KB
...st.ts-snapshots/PIN-1-1-pin-video-tile-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+30.6 KB
...Pinning.test.ts-snapshots/PIN-1-2-pin-video-tile-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.3 KB
...st.ts-snapshots/PIN-1-2-pin-video-tile-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...est.ts-snapshots/PIN-1-2-pin-video-tile-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.1 KB
...ning.test.ts-snapshots/PIN-1-3-unpin-video-tile-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.6 KB
...ts-snapshots/PIN-1-3-unpin-video-tile-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+43.3 KB
....ts-snapshots/PIN-1-3-unpin-video-tile-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.4 KB
...nning.test.ts-snapshots/PIN-1-4-unpin-video-tile-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
....ts-snapshots/PIN-1-4-unpin-video-tile-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+49.2 KB
...t.ts-snapshots/PIN-1-4-unpin-video-tile-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.5 KB
....test.ts-snapshots/PIN-2-1-pin-participant-item-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
...napshots/PIN-2-1-pin-participant-item-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+48.8 KB
...snapshots/PIN-2-1-pin-participant-item-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+63.7 KB
...g.test.ts-snapshots/PIN-2-2-pin-participant-item-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.4 KB
...snapshots/PIN-2-2-pin-participant-item-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+60.2 KB
...-snapshots/PIN-2-2-pin-participant-item-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+68.5 KB
...est.ts-snapshots/PIN-2-3-unpin-participant-item-before-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+39.9 KB
...pshots/PIN-2-3-unpin-participant-item-before-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+121 KB
...apshots/PIN-2-3-unpin-participant-item-before-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+58.7 KB
...test.ts-snapshots/PIN-2-4-unpin-participant-item-after-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.4 KB
...apshots/PIN-2-4-unpin-participant-item-after-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+48.8 KB
...napshots/PIN-2-4-unpin-participant-item-after-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Binary file added
BIN
+46.4 KB
...rmetic/Pinning.test.ts-snapshots/PIN-3-1-pin-max-tiles-Desktop-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+38.4 KB
...ning.test.ts-snapshots/PIN-3-1-pin-max-tiles-Mobile-Android-Landscape-linux.png
Oops, something went wrong.
Binary file added
BIN
+78.1 KB
...nning.test.ts-snapshots/PIN-3-1-pin-max-tiles-Mobile-Android-Portrait-linux.png
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these control bars because we are just testing in the components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean the scroll bars, then no. I will fix the component or window size of the test config so that there are no xcrollbars.