-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dash): Disable Settings menu when HD is not available (#1406)
- Loading branch information
Conrad Chan
authored
Jun 29, 2021
1 parent
6291777
commit 778e455
Showing
11 changed files
with
125 additions
and
39 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
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
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
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
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
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
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
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
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
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