Skip to content

Commit 71de6fd

Browse files
committed
Add Bitmovin test
1 parent ba4f030 commit 71de6fd

2 files changed

Lines changed: 59 additions & 3 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { TestScope } from 'cavy';
2+
import { BitmovinConnector } from '@theoplayer/react-native-analytics-bitmovin';
3+
import { testConnector } from './ConnectorUtils';
4+
import { THEOplayer } from 'react-native-theoplayer';
5+
6+
export default function (spec: TestScope) {
7+
spec.describe(`Setup Bitmovin connector`, function () {
8+
let connector: BitmovinConnector;
9+
testConnector(
10+
spec,
11+
(player: THEOplayer) => {
12+
connector = new BitmovinConnector(
13+
player,
14+
{
15+
licenseKey: 'license-key-here',
16+
logLevel: 'DEBUG',
17+
},
18+
{
19+
cdnProvider: 'akamai',
20+
customUserId: 'custom-user-id-1234',
21+
customData: {
22+
customData1: 'value1',
23+
customData2: 'value2',
24+
},
25+
},
26+
);
27+
connector.updateSourceMetadata({
28+
title: 'Sample Video',
29+
videoId: 'video-1234',
30+
cdnProvider: 'akamai',
31+
path: '/home/videos/sample-video',
32+
isLive: false,
33+
customData: {
34+
customData10: 'value10',
35+
customData11: 'value11',
36+
},
37+
});
38+
},
39+
() => {
40+
connector.updateCustomData({
41+
customData0: 'newValue0',
42+
customData1: 'newValue1',
43+
});
44+
connector.programChange({
45+
title: 'New Live Program',
46+
videoId: 'live-program-5678',
47+
customData: {
48+
customData10: 'newValue10',
49+
},
50+
});
51+
},
52+
() => {
53+
connector.destroy();
54+
},
55+
);
56+
});
57+
}

apps/e2e/src/tests/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import Adobe from './Adobe.spec';
22
import AdobeNative from './AdobeNative.spec';
33
import AdobeEdge from './AdobeEdge.spec';
4+
import Bitmovin from './Bitmovin.spec';
45
import Comscore from './Comscore.spec';
56
import Conviva from './Conviva.spec';
67
import Nielsen from './Nielsen.spec';
7-
import { Platform } from 'react-native';
88

9-
const tests = Platform.OS === 'ios' ? [Adobe, AdobeNative, Comscore, Conviva, Nielsen] :
10-
[Adobe, AdobeNative, AdobeEdge, Comscore, Conviva, Nielsen];
9+
const tests = [Adobe, AdobeNative, AdobeEdge, Bitmovin, Comscore, Conviva, Nielsen];
1110

1211
export default tests;

0 commit comments

Comments
 (0)