-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Conrad Chan
committed
Jun 25, 2021
1 parent
281b18b
commit 1949fc2
Showing
2 changed files
with
53 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,69 @@ | ||
import { | ||
runAudioTracksTests, | ||
runBaseMediaSettingsTests, | ||
runLowQualityMenuTests, | ||
runQualityMenuTests, | ||
runSubtitlesTests, | ||
} from '../../support/mediaSettingsTests'; | ||
|
||
describe('Dash Viewer', () => { | ||
const token = Cypress.env('ACCESS_TOKEN'); | ||
const fileIdVideo = Cypress.env('FILE_ID_VIDEO_SUBTITLES_TRACKS'); | ||
const fileIdVideoSmall = Cypress.env('FILE_ID_VIDEO_SMALL'); | ||
|
||
describe('Media Settings Controls', () => { | ||
describe('Without react controls', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
cy.showPreview(token, fileIdVideo, { | ||
viewers: { Dash: { useReactControls: false } }, | ||
}); | ||
const setupTest = (fileId, useReactControls) => { | ||
cy.visit('/'); | ||
cy.showPreview(token, fileId, { | ||
viewers: { Dash: { useReactControls } }, | ||
}); | ||
|
||
cy.showMediaControls(); | ||
cy.showMediaControls(); | ||
|
||
// Open the menu | ||
cy.getByTitle('Settings').click(); | ||
}); | ||
// Open the menu | ||
cy.getByTitle('Settings').click(); | ||
}; | ||
|
||
runBaseMediaSettingsTests(); | ||
describe('HD Video with Subtitles', () => { | ||
describe('Media Settings Controls', () => { | ||
describe('Without react controls', () => { | ||
beforeEach(() => setupTest(fileIdVideo, false)); | ||
|
||
runQualityMenuTests(); | ||
runBaseMediaSettingsTests(); | ||
|
||
runAudioTracksTests(); | ||
runQualityMenuTests(); | ||
|
||
runSubtitlesTests(); | ||
}); | ||
runAudioTracksTests(); | ||
|
||
runSubtitlesTests(); | ||
}); | ||
|
||
describe('With react controls', () => { | ||
beforeEach(() => setupTest(fileIdVideo, true)); | ||
|
||
describe('With react controls', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
cy.showPreview(token, fileIdVideo, { | ||
viewers: { Dash: { useReactControls: true } }, | ||
}); | ||
runBaseMediaSettingsTests(); | ||
|
||
cy.showMediaControls(); | ||
runQualityMenuTests(); | ||
|
||
// Open the menu | ||
cy.getByTitle('Settings').click(); | ||
runAudioTracksTests(); | ||
|
||
runSubtitlesTests(); | ||
}); | ||
}); | ||
}); | ||
|
||
runBaseMediaSettingsTests(); | ||
describe('Non HD Video', () => { | ||
describe('Media Settings Controls', () => { | ||
describe('Without react controls', () => { | ||
beforeEach(() => setupTest(fileIdVideoSmall, false)); | ||
|
||
runQualityMenuTests(); | ||
runLowQualityMenuTests(); | ||
}); | ||
|
||
runAudioTracksTests(); | ||
describe('With react controls', () => { | ||
beforeEach(() => setupTest(fileIdVideoSmall, true)); | ||
|
||
runSubtitlesTests(); | ||
runLowQualityMenuTests(); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters