Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix tests, remove qunit only #1449

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions test/playlist-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6365,6 +6365,14 @@ QUnit.module('PlaylistController contentSteering', {
]
};

this.setupSteeringPlaylists = (pc, mainPlaylist) => {
pc.main = () => mainPlaylist;
pc.media = () => mainPlaylist.playlists[0];
pc.mainPlaylistLoader_.main = mainPlaylist;
pc.mainPlaylistLoader_.media = () => mainPlaylist.playlists[0];
pc.selectPlaylist = () => pc.main().playlists[0];
};

},
afterEach(assert) {
sharedHooks.afterEach.call(this, assert);
Expand Down Expand Up @@ -6892,6 +6900,10 @@ QUnit.test('Pathway cloning - add a new pathway when the clone has not existed',

const pc = new PlaylistController(options);

// Set up steering playlists
this.setupSteeringPlaylists(pc, this.csMainPlaylist);
pc.attachContentSteeringListeners_();

this.csMainPlaylist.playlists.forEach(p => {
p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation;
p.attributes.serviceLocation = undefined;
Expand Down Expand Up @@ -6949,6 +6961,9 @@ QUnit.test('Pathway cloning - update the pathway when the BASE-ID does not match

const pc = new PlaylistController(options);

this.setupSteeringPlaylists(pc, this.csMainPlaylist);
pc.attachContentSteeringListeners_();

this.csMainPlaylist.playlists.forEach(p => {
p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation;
p.attributes.serviceLocation = undefined;
Expand Down Expand Up @@ -7020,6 +7035,9 @@ QUnit.test('Pathway cloning - update the pathway when there is a new param', fun

const pc = new PlaylistController(options);

this.setupSteeringPlaylists(pc, this.csMainPlaylist);
pc.attachContentSteeringListeners_();

this.csMainPlaylist.playlists.forEach(p => {
p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation;
p.attributes.serviceLocation = undefined;
Expand Down Expand Up @@ -7093,6 +7111,9 @@ QUnit.test('Pathway cloning - update the pathway when a param is missing', funct

const pc = new PlaylistController(options);

this.setupSteeringPlaylists(pc, this.csMainPlaylist);
pc.attachContentSteeringListeners_();

this.csMainPlaylist.playlists.forEach(p => {
p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation;
p.attributes.serviceLocation = undefined;
Expand Down Expand Up @@ -7163,6 +7184,9 @@ QUnit.test('Pathway cloning - delete the pathway when it is no longer in the ste

const pc = new PlaylistController(options);

this.setupSteeringPlaylists(pc, this.csMainPlaylist);
pc.attachContentSteeringListeners_();

this.csMainPlaylist.playlists.forEach(p => {
p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation;
p.attributes.serviceLocation = undefined;
Expand Down Expand Up @@ -7221,6 +7245,9 @@ QUnit.test('Pathway cloning - do nothing when next and past clones are the same'

const pc = new PlaylistController(options);

this.setupSteeringPlaylists(pc, this.csMainPlaylist);
pc.attachContentSteeringListeners_();

this.csMainPlaylist.playlists.forEach(p => {
p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation;
p.attributes.serviceLocation = undefined;
Expand Down
2 changes: 1 addition & 1 deletion test/videojs-http-streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ QUnit.test('VhsHandler is referenced by player.tech().vhs', function(assert) {
);
});

QUnit.test.only('options are updated when setOptions is called', function(assert) {
QUnit.test('options are updated when setOptions is called', function(assert) {
this.player.src({
src: 'manifest/playlist.m3u8',
type: 'application/vnd.apple.mpegurl'
Expand Down