Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgamis-msft committed Dec 3, 2024
1 parent fc733a4 commit c2a3c94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
13 changes: 6 additions & 7 deletions packages/react-components/tests/browser/VideoGallery.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ test.describe('VGL - VideoGallery tests', () => {
})
);
// Assign video stream to some participants
remoteParticipants.find((p) => p.userId === '2')!.videoStream = { isAvailable: true };
remoteParticipants.find((p) => p.userId === '3')!.videoStream = { isAvailable: true };
remoteParticipants.find((p) => p.userId === '5')!.videoStream = { isAvailable: true };
remoteParticipants.find((p) => p.userId === '7')!.videoStream = { isAvailable: true };
remoteParticipants.find((p) => p.userId === '9')!.videoStream = { isAvailable: true };
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' } }}>
Expand Down Expand Up @@ -134,8 +134,7 @@ test.describe('VGL - VideoGallery tests', () => {
</Stack>
);
await expect(component).toHaveScreenshot('VGL-4-1-videogallery-before-spotlight.png');

remoteParticipants.find((p) => p.userId === '8')!.spotlight = { spotlightedOrderPosition: 1 };
remoteParticipants[7].spotlight = { spotlightedOrderPosition: 1 };
component.update(
<Stack styles={{ root: { width: '100vw', height: '100vh' } }}>
<VideoGallery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const displayNames = [
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));
addVideoStream(participants[1], true);
if (participants[1]) {
addVideoStream(participants[1], true);
}
const initialState = defaultMockCallAdapterState(participants);

await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { newControlBarExperience: 'true' }));
Expand Down Expand Up @@ -80,7 +82,9 @@ test.describe('PIN - Pinning tests', async () => {

test('Pin and unpin remote participants via participant item', async ({ page, serverUrl }, testInfo) => {
const participants = displayNames.map((name) => defaultMockRemoteParticipant(name));
addVideoStream(participants[1], true);
if (participants[1]) {
addVideoStream(participants[1], true);
}
const initialState = defaultMockCallAdapterState(participants);

await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { newControlBarExperience: 'true' }));
Expand Down Expand Up @@ -130,7 +134,9 @@ test.describe('PIN - Pinning tests', async () => {

test('Pin max remote participants', async ({ page, serverUrl }, testInfo) => {
const participants = displayNames.map((name) => defaultMockRemoteParticipant(name));
addVideoStream(participants[1], true);
if (participants[1]) {
addVideoStream(participants[1], true);
}
const initialState = defaultMockCallAdapterState(participants);

await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { newControlBarExperience: 'true' }));
Expand Down

0 comments on commit c2a3c94

Please sign in to comment.