-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(video-player): Test that video player correcly plays HLS playlist
- Loading branch information
1 parent
6d78f79
commit a6d7a6f
Showing
12 changed files
with
749 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { PLAYBACK_URL_FILE_PATH } from '../utils/constant'; | ||
import { aliasMutation } from '../utils/graphql-test-utils'; | ||
|
||
describe('Generate playback url', () => { | ||
beforeEach(() => { | ||
/* cy.intercept('/graphql', (req) => { | ||
aliasMutation(req, 'getVodAsset'); | ||
}); */ | ||
}); | ||
|
||
it('should generate playback url with token property if signed url', () => { | ||
let id = null; | ||
cy.visit('/'); | ||
cy.wait(12000); // WAIT FOR MEDIACONVERT JOB | ||
cy.readFile(PLAYBACK_URL_FILE_PATH).then(({ data }) => { | ||
cy.intercept(data.playbackUrl + data.token).as('HLS'); | ||
cy.get('[data-cy=video-url-input]').type(data.playbackUrl); | ||
cy.get('[data-cy=video-token-input]').type(data.token); | ||
cy.get('[data-cy=player]').click(); | ||
cy.wait('@HLS').its('response.statusCode').should('eq', 200) | ||
}); | ||
}); | ||
}); |
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 +1,2 @@ | ||
export const RESPONSE_FILE_PATH = 'cypress/fixtures/upload-response.json'; | ||
export const PLAYBACK_URL_FILE_PATH = 'cypress/fixtures/playback-url.json'; |
Oops, something went wrong.