Skip to content

Commit

Permalink
Add missing Tests - Github Actions (#44)
Browse files Browse the repository at this point in the history
### Description of the Changes

Add missing Tests - Github Actions

---------

Co-authored-by: JonathanTGold <jonathan.gold@[email protected]>
  • Loading branch information
JonathanTGold and JonathanTGold authored Mar 13, 2024
1 parent dbaa0f9 commit d561f8a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ jobs:
tests:
uses: kaltura/playkit-js-common/.github/workflows/cypress.yml@master
secrets: inherit
build:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
node-version: '18.x'
yarn-run-to-execute: 'build'
lint:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
node-version: '18.x'
yarn-run-to-execute: 'eslint'



notification:
if: always()
Expand All @@ -21,5 +33,4 @@ jobs:
with:
failure-status: ${{ contains(needs.*.result, 'failure') }}
cancelled-status: ${{ contains(needs.*.result, 'cancelled') }}
is-test: 'true'

is-test: 'true'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"pushTaggedRelease": "git push --follow-tags --no-verify origin master",
"release": "standard-version",
"eslint": "eslint . --color",
"eslint:fix": "eslint . --color --fix",
"prettier:fix": "prettier --write .",
"cy:open": "cypress open",
"cy:run": "yarn run cy:run:chrome && yarn run cy:run:firefox && yarn run cy:run:edge && yarn run cy:run:safari",
Expand Down
13 changes: 11 additions & 2 deletions src/components/attachments-list/attachments-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {DownloadItem} from '../download-item';
import * as styles from './attachments-list.scss';
import {ComponentChildren} from 'preact';
import {getIconByFileExt} from '@playkit-js/common/dist/icon/icon-utils';
import { assetType } from '../../consts/asset-type';
import {assetType} from '../../consts/asset-type';

const {withText} = KalturaPlayer.ui.preacti18n;

Expand All @@ -22,7 +22,16 @@ export const AttachmentsList = withText({
};

const _renderDownloadItem = (key: string, fileName: string, downloadUrl: string, icon: ComponentChildren) => {
return <DownloadItem downloadPluginManager={downloadPluginManager} key={key} fileName={fileName} downloadUrl={downloadUrl} assetType={assetType.Attachments} iconFileType={icon} />;
return (
<DownloadItem
downloadPluginManager={downloadPluginManager}
key={key}
fileName={fileName}
downloadUrl={downloadUrl}
assetType={assetType.Attachments}
iconFileType={icon}
/>
);
};

const _renderAttachments = (attachments: Array<KalturaAttachmentAsset>) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/captions-list/captions-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {DownloadItem} from '../download-item';
import * as styles from './captions-list.scss';
import {ExpandableContainer} from '../expandable-container';
import {Icon as CommonIcon} from '@playkit-js/common/dist/icon';
import { assetType } from '../../consts/asset-type';
import {assetType} from '../../consts/asset-type';

const {withText} = KalturaPlayer.ui.preacti18n;

Expand Down
5 changes: 2 additions & 3 deletions src/components/sources-list/sources-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {DownloadConfig} from '../../types';
import {ExpandableContainer} from '../expandable-container';
import {ComponentChildren} from 'preact';
import {Icon as CommonIcon} from '@playkit-js/common/dist/icon';
import { assetType } from '../../consts/asset-type';
import {assetType} from '../../consts/asset-type';
const {Icon, IconType} = KalturaPlayer.ui.components;

const {withText} = KalturaPlayer.ui.preacti18n;
Expand Down Expand Up @@ -149,9 +149,8 @@ export const SourcesList = withText({
return _renderDownloadItem('1', fileName, '', imageUrl, _getImageIcon(), true);
} else if (flavors.length > 0) {
return _renderExpandableFlavors();
} else {
return undefined;
}
return undefined;
};

return (
Expand Down
6 changes: 3 additions & 3 deletions src/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {DownloadPluginManager} from './download-plugin-manager';

import {OnClickEvent} from '@playkit-js/common';
import {ui} from '@playkit-js/kaltura-player-js';
import { DownloadEvent } from "./event";
import {DownloadEvent} from './event';

const {ReservedPresetNames} = ui;
const {Text} = ui.preacti18n;
Expand Down Expand Up @@ -141,8 +141,8 @@ class Download extends KalturaPlayer.core.BasePlugin {
}

_addBindings() {
this.eventManager.listen(this.downloadPluginManager, DownloadEvent.SHOW_OVERLAY, (e) => this.dispatchEvent(DownloadEvent.SHOW_OVERLAY, e.payload));
this.eventManager?.listen(this.downloadPluginManager, DownloadEvent.HIDE_OVERLAY, (e) => this.dispatchEvent(DownloadEvent.HIDE_OVERLAY, e.payload));
this.eventManager.listen(this.downloadPluginManager, DownloadEvent.SHOW_OVERLAY, e => this.dispatchEvent(DownloadEvent.SHOW_OVERLAY, e.payload));
this.eventManager?.listen(this.downloadPluginManager, DownloadEvent.HIDE_OVERLAY, e => this.dispatchEvent(DownloadEvent.HIDE_OVERLAY, e.payload));
}

reset() {
Expand Down

0 comments on commit d561f8a

Please sign in to comment.