From a2eb5616eed00a1b30bb2b33b1d6eb9ce365f585 Mon Sep 17 00:00:00 2001 From: mgamis-msft <79475487+mgamis-msft@users.noreply.github.com> Date: Tue, 3 Dec 2024 07:24:12 +0000 Subject: [PATCH] lint fixes --- .../tests/browser/VideoGallery.spec.tsx | 13 ++++++------- .../tests/browser/call/hermetic/Pinning.test.ts | 12 +++++++++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/react-components/tests/browser/VideoGallery.spec.tsx b/packages/react-components/tests/browser/VideoGallery.spec.tsx index 6587e763f05..e310694241a 100644 --- a/packages/react-components/tests/browser/VideoGallery.spec.tsx +++ b/packages/react-components/tests/browser/VideoGallery.spec.tsx @@ -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[3].videoStream = { isAvailable: true }; + remoteParticipants[4].videoStream = { isAvailable: true }; + remoteParticipants[5].videoStream = { isAvailable: true }; const component = await mount( @@ -134,8 +134,7 @@ test.describe('VGL - VideoGallery tests', () => { ); 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( { 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' })); @@ -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' })); @@ -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' }));