From 99f2959f8cba5b5d6c6f5443f3bc9249d8c9163f Mon Sep 17 00:00:00 2001 From: Sivan Agranov <88330203+SivanA-Kaltura@users.noreply.github.com> Date: Mon, 13 Sep 2021 11:14:08 +0300 Subject: [PATCH] fix(FEC-11510): fix cvaa default font size (#491) Remove references to fontScale to match changes in playkit-js. Fixes FEC-11510. Related PRs: kaltura/playkit-js#603 kaltura/playkit-js-ui#639 --- test/src/setup.spec.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/src/setup.spec.js b/test/src/setup.spec.js index d5c308644..d2ba5891b 100644 --- a/test/src/setup.spec.js +++ b/test/src/setup.spec.js @@ -2,6 +2,7 @@ import '../../src/index'; import {setup} from '../../src/setup'; import * as TestUtils from './utils/test-utils'; import StorageWrapper from '../../src/common/storage/storage-wrapper'; +import {TextStyle} from '@playkit-js/playkit-js'; const targetId = 'player-placeholder_setup.spec'; @@ -69,20 +70,18 @@ describe('setup', function () { }); it('should set text style from storage', function () { - let textStyle = { - fontSize: '20%', + let textStyle = TextStyle.fromJson({ + fontSize: '75%', fontFamily: 'sans-serif', fontColor: [14, 15, 0], fontOpacity: 0, backgroundColor: [1, 2, 3], backgroundOpacity: 1, - fontEdge: [], - fontScale: 1 - }; + fontEdge: [] + }); sandbox.stub(StorageWrapper, 'getItem').withArgs('textStyle').returns(textStyle); kalturaPlayer = setup(config); - const textStyleObj = JSON.parse(JSON.stringify(kalturaPlayer.textStyle)); - textStyleObj.should.deep.equal(textStyle); + kalturaPlayer.textStyle.should.deep.equal(textStyle); }); it('should configure sources', function (done) {