Skip to content

Commit b8c534f

Browse files
committed
stabilize snapshots for VideoGallery component tests
1 parent 155281d commit b8c534f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/react-components/tests/browser/VideoGallery.spec.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ test.describe('VGL - VideoGallery tests', () => {
2929
/>
3030
</Stack>
3131
);
32+
await component.waitFor({ state: 'attached' });
3233
await expect(component).toHaveScreenshot('VGL-1-1-videogallery-with-audio-only-before-dominant-speakers.png');
3334
await component.update(
3435
<Stack styles={{ root: { width: '90vw', height: '90vh' } }}>
@@ -40,6 +41,7 @@ test.describe('VGL - VideoGallery tests', () => {
4041
/>
4142
</Stack>
4243
);
44+
await component.waitFor({ state: 'attached' });
4345
await expect(component).toHaveScreenshot('VGL-1-2-videogallery-with-audio-only-after-dominant-speakers.png');
4446
});
4547

@@ -67,6 +69,7 @@ test.describe('VGL - VideoGallery tests', () => {
6769
/>
6870
</Stack>
6971
);
72+
await component.waitFor({ state: 'attached' });
7073
await expect(component).toHaveScreenshot('VGL-2-1-videogallery-with-some-video-before-dominant-speakers.png');
7174
await component.update(
7275
<Stack styles={{ root: { width: '90vw', height: '90vh' } }}>
@@ -78,6 +81,7 @@ test.describe('VGL - VideoGallery tests', () => {
7881
/>
7982
</Stack>
8083
);
84+
await component.waitFor({ state: 'attached' });
8185
await expect(component).toHaveScreenshot('VGL-2-2-videogallery--with-some-video-after-dominant-speakers.png');
8286
});
8387

@@ -100,6 +104,7 @@ test.describe('VGL - VideoGallery tests', () => {
100104
/>
101105
</Stack>
102106
);
107+
await component.waitFor({ state: 'attached' });
103108
await expect(component).toHaveScreenshot('VGL-3-1-videogallery-with-screen-share-before-dominant-speakers.png');
104109
await component.update(
105110
<Stack styles={{ root: { width: '90vw', height: '90vw' } }}>
@@ -111,6 +116,7 @@ test.describe('VGL - VideoGallery tests', () => {
111116
/>
112117
</Stack>
113118
);
119+
await component.waitFor({ state: 'attached' });
114120
await expect(component).toHaveScreenshot('VGL-3-2-videogallery-with-screen-share-after-dominant-speakers.png');
115121
});
116122

@@ -133,6 +139,7 @@ test.describe('VGL - VideoGallery tests', () => {
133139
/>
134140
</Stack>
135141
);
142+
await component.waitFor({ state: 'attached' });
136143
await expect(component).toHaveScreenshot('VGL-4-1-videogallery-before-spotlight.png');
137144
remoteParticipants[7].spotlight = { spotlightedOrderPosition: 1 };
138145
component.update(
@@ -145,6 +152,7 @@ test.describe('VGL - VideoGallery tests', () => {
145152
/>
146153
</Stack>
147154
);
155+
await component.waitFor({ state: 'attached' });
148156
await expect(component).toHaveScreenshot('VGL-4-2-videogallery-after-spotlight.png');
149157
});
150158
});

0 commit comments

Comments
 (0)