Skip to content

Commit 0e6c97e

Browse files
tests
1 parent 0f59d47 commit 0e6c97e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

static/app/components/replays/videoReplayer.spec.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ describe('VideoReplayer - no starting gap', () => {
8787
onFinished: jest.fn(),
8888
onLoaded: jest.fn(),
8989
onBuffer: jest.fn(),
90+
duration: 40,
9091
});
9192
// @ts-expect-error private
9293
expect(inst._currentIndex).toEqual(0);
@@ -112,6 +113,7 @@ describe('VideoReplayer - no starting gap', () => {
112113
onFinished: jest.fn(),
113114
onLoaded: jest.fn(),
114115
onBuffer: jest.fn(),
116+
duration: 40,
115117
});
116118
const playPromise = inst.play(18100);
117119
// @ts-expect-error private
@@ -140,6 +142,7 @@ describe('VideoReplayer - no starting gap', () => {
140142
onFinished: jest.fn(),
141143
onLoaded: jest.fn(),
142144
onBuffer: jest.fn(),
145+
duration: 40,
143146
});
144147
const playPromise = inst.play(50000);
145148
// 15000 -> 20000 is a gap, so player should start playing @ index 3, from
@@ -162,6 +165,7 @@ describe('VideoReplayer - no starting gap', () => {
162165
onFinished: jest.fn(),
163166
onLoaded: jest.fn(),
164167
onBuffer: jest.fn(),
168+
duration: 40,
165169
});
166170
const playPromise = inst.play(0);
167171
jest.advanceTimersByTime(2500);
@@ -181,6 +185,7 @@ describe('VideoReplayer - no starting gap', () => {
181185
onFinished: jest.fn(),
182186
onLoaded: jest.fn(),
183187
onBuffer: jest.fn(),
188+
duration: 50,
184189
});
185190
// play at segment 7
186191
const playPromise = inst.play(45_003);
@@ -215,6 +220,7 @@ describe('VideoReplayer - no starting gap', () => {
215220
onFinished: jest.fn(),
216221
onLoaded: jest.fn(),
217222
onBuffer: jest.fn(),
223+
duration: 60,
218224
});
219225
// play at segment 7
220226
const playPromise = inst.play(45_003);
@@ -288,6 +294,7 @@ describe('VideoReplayer - with starting gap', () => {
288294
onFinished: jest.fn(),
289295
onLoaded: jest.fn(),
290296
onBuffer: jest.fn(),
297+
duration: 40,
291298
});
292299
// @ts-expect-error private
293300
expect(inst._currentIndex).toEqual(0);
@@ -311,6 +318,7 @@ describe('VideoReplayer - with starting gap', () => {
311318
onFinished: jest.fn(),
312319
onLoaded: jest.fn(),
313320
onBuffer: jest.fn(),
321+
duration: 40,
314322
});
315323
const playPromise = inst.play(18100);
316324
// @ts-expect-error private
@@ -339,6 +347,7 @@ describe('VideoReplayer - with starting gap', () => {
339347
onFinished: jest.fn(),
340348
onLoaded: jest.fn(),
341349
onBuffer: jest.fn(),
350+
duration: 40,
342351
});
343352
const playPromise = inst.play(50000);
344353
// 15000 -> 20000 is a gap, so player should start playing @ index 3, from

0 commit comments

Comments
 (0)