Skip to content

Commit

Permalink
chore: upd tests (#167)
Browse files Browse the repository at this point in the history
* chore: upd tests
* chore: fix version for canary build
  • Loading branch information
semarche-kaltura committed Nov 6, 2023
1 parent f3f0a92 commit 9781460
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions cypress/e2e/transcript.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {ui} from '@playkit-js/kaltura-player-js';
import {mockKalturaBe, loadPlayer, clickClosePluginButton} from './env';

const MANIFEST = `#EXTM3U
Expand Down Expand Up @@ -232,17 +233,15 @@ describe('Transcript plugin', () => {

it('should render small screen slate for small mobile screens', () => {
cy.viewport('iphone-6');
cy.on('window:before:load', win => {
Object.defineProperty(win.navigator, 'userAgent', {
value:
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'
});
});
mockKalturaBe();
loadPlayer().then(() => {
loadPlayer().then(kalturaPlayer => {
cy.viewport(414, 736);
// @ts-ignore
kalturaPlayer.ui.store.dispatch(ui.reducers.shell.actions.updateIsMobile(true));
cy.get(`[data-testid="transcript_smallScreenTextContent"]`).should('have.text', 'To see the transcript, rotate the phone');
cy.get(`[data-testid="transcript_smallScreenFullscreen"]`).should('not.exist');
cy.viewport('iphone-6', 'landscape');
cy.viewport(736, 414);
cy.get(`[data-testid="transcript_smallScreenTextContent"]`).should('not.be.visible');
});
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@playkit-js/transcript",
"version": "3.5.0",
"version": "3.5.1",
"main": "dist/playkit-transcript.js",
"license": "AGPL-3.0",
"private": false,
Expand Down

0 comments on commit 9781460

Please sign in to comment.