@coorpacademy/player-web 4.22.52 → 4.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +1 -8
- package/es/index.js.map +1 -1
- package/es/map-state-to-props/answer.js +0 -35
- package/es/map-state-to-props/answer.js.map +1 -1
- package/es/map-state-to-props/error-popin.js +0 -4
- package/es/map-state-to-props/error-popin.js.map +1 -1
- package/es/map-state-to-props/header.js +3 -14
- package/es/map-state-to-props/header.js.map +1 -1
- package/es/map-state-to-props/index.js +0 -6
- package/es/map-state-to-props/index.js.map +1 -1
- package/es/map-state-to-props/loading.js +0 -1
- package/es/map-state-to-props/loading.js.map +1 -1
- package/es/map-state-to-props/player.js +0 -13
- package/es/map-state-to-props/player.js.map +1 -1
- package/es/map-state-to-props/popin-correction.js +0 -25
- package/es/map-state-to-props/popin-correction.js.map +1 -1
- package/es/map-state-to-props/popin-end.js +6 -35
- package/es/map-state-to-props/popin-end.js.map +1 -1
- package/es/map-state-to-props/resources.js +4 -10
- package/es/map-state-to-props/resources.js.map +1 -1
- package/es/map-state-to-props/slide.js +0 -2
- package/es/map-state-to-props/slide.js.map +1 -1
- package/es/map-state-to-props/test/answer.js +0 -21
- package/es/map-state-to-props/test/answer.js.map +1 -1
- package/es/map-state-to-props/test/header.js +0 -2
- package/es/map-state-to-props/test/header.js.map +1 -1
- package/es/map-state-to-props/test/index.js +22 -29
- package/es/map-state-to-props/test/index.js.map +1 -1
- package/es/map-state-to-props/test/player.js +6 -19
- package/es/map-state-to-props/test/player.js.map +1 -1
- package/es/map-state-to-props/test/popin-correction.create-header-cta.js +0 -15
- package/es/map-state-to-props/test/popin-correction.create-header-cta.js.map +1 -1
- package/es/map-state-to-props/test/popin-correction.js +0 -8
- package/es/map-state-to-props/test/popin-correction.js.map +1 -1
- package/es/map-state-to-props/test/popin-end.js +0 -13
- package/es/map-state-to-props/test/popin-end.js.map +1 -1
- package/es/map-state-to-props/test/popin-error.js.map +1 -1
- package/es/map-state-to-props/test/resources.js +0 -2
- package/es/map-state-to-props/test/resources.js.map +1 -1
- package/es/run-app.js +0 -2
- package/es/run-app.js.map +1 -1
- package/es/store.js +0 -4
- package/es/store.js.map +1 -1
- package/es/test/add-timeout.js.map +1 -1
- package/es/test/helpers/css-register.js.map +1 -1
- package/es/test/helpers/macro.js +0 -1
- package/es/test/helpers/macro.js.map +1 -1
- package/es/test/index.js.map +1 -1
- package/es/test/init-reducers.js.map +1 -1
- package/es/test/locales.js.map +1 -1
- package/es/test/run-app.js.map +1 -1
- package/es/test/store.js.map +1 -1
- package/es/views/index.js.map +1 -1
- package/es/views/test/helpers/render.js +0 -2
- package/es/views/test/helpers/render.js.map +1 -1
- package/es/views/test/helpers/state-to-vnode.js +0 -2
- package/es/views/test/helpers/state-to-vnode.js.map +1 -1
- package/es/views/test/loading.js.map +1 -1
- package/es/views/test/popin-correction.js +0 -6
- package/es/views/test/popin-correction.js.map +1 -1
- package/es/views/test/popin-end.js.map +1 -1
- package/es/views/test/router.js.map +1 -1
- package/es/views/test/slide.js +0 -1
- package/es/views/test/slide.js.map +1 -1
- package/lib/index.js +2 -18
- package/lib/index.js.map +1 -1
- package/lib/map-state-to-props/answer.js +1 -47
- package/lib/map-state-to-props/answer.js.map +1 -1
- package/lib/map-state-to-props/error-popin.js +2 -10
- package/lib/map-state-to-props/error-popin.js.map +1 -1
- package/lib/map-state-to-props/header.js +5 -19
- package/lib/map-state-to-props/header.js.map +1 -1
- package/lib/map-state-to-props/index.js +1 -19
- package/lib/map-state-to-props/index.js.map +1 -1
- package/lib/map-state-to-props/loading.js +1 -4
- package/lib/map-state-to-props/loading.js.map +1 -1
- package/lib/map-state-to-props/player.js +2 -22
- package/lib/map-state-to-props/player.js.map +1 -1
- package/lib/map-state-to-props/popin-correction.js +1 -32
- package/lib/map-state-to-props/popin-correction.js.map +1 -1
- package/lib/map-state-to-props/popin-end.js +8 -47
- package/lib/map-state-to-props/popin-end.js.map +1 -1
- package/lib/map-state-to-props/resources.js +6 -20
- package/lib/map-state-to-props/resources.js.map +1 -1
- package/lib/map-state-to-props/slide.js +2 -11
- package/lib/map-state-to-props/slide.js.map +1 -1
- package/lib/map-state-to-props/test/answer.js +1 -37
- package/lib/map-state-to-props/test/answer.js.map +1 -1
- package/lib/map-state-to-props/test/header.js +1 -12
- package/lib/map-state-to-props/test/header.js.map +1 -1
- package/lib/map-state-to-props/test/index.js +23 -20
- package/lib/map-state-to-props/test/index.js.map +1 -1
- package/lib/map-state-to-props/test/player.js +12 -52
- package/lib/map-state-to-props/test/player.js.map +1 -1
- package/lib/map-state-to-props/test/popin-correction.create-header-cta.js +1 -27
- package/lib/map-state-to-props/test/popin-correction.create-header-cta.js.map +1 -1
- package/lib/map-state-to-props/test/popin-correction.js +1 -11
- package/lib/map-state-to-props/test/popin-correction.js.map +1 -1
- package/lib/map-state-to-props/test/popin-end.js +1 -26
- package/lib/map-state-to-props/test/popin-end.js.map +1 -1
- package/lib/map-state-to-props/test/popin-error.js +1 -6
- package/lib/map-state-to-props/test/popin-error.js.map +1 -1
- package/lib/map-state-to-props/test/resources.js +1 -11
- package/lib/map-state-to-props/test/resources.js.map +1 -1
- package/lib/run-app.js +1 -5
- package/lib/run-app.js.map +1 -1
- package/lib/store.js +1 -11
- package/lib/store.js.map +1 -1
- package/lib/test/add-timeout.js +1 -4
- package/lib/test/add-timeout.js.map +1 -1
- package/lib/test/helpers/css-register.js +1 -3
- package/lib/test/helpers/css-register.js.map +1 -1
- package/lib/test/helpers/macro.js +1 -4
- package/lib/test/helpers/macro.js.map +1 -1
- package/lib/test/index.js +3 -12
- package/lib/test/index.js.map +1 -1
- package/lib/test/init-reducers.js +1 -5
- package/lib/test/init-reducers.js.map +1 -1
- package/lib/test/locales.js +1 -8
- package/lib/test/locales.js.map +1 -1
- package/lib/test/run-app.js +1 -5
- package/lib/test/run-app.js.map +1 -1
- package/lib/test/store.js +1 -5
- package/lib/test/store.js.map +1 -1
- package/lib/views/index.js +2 -9
- package/lib/views/index.js.map +1 -1
- package/lib/views/test/helpers/render.js +2 -10
- package/lib/views/test/helpers/render.js.map +1 -1
- package/lib/views/test/helpers/state-to-vnode.js +1 -6
- package/lib/views/test/helpers/state-to-vnode.js.map +1 -1
- package/lib/views/test/loading.js +1 -5
- package/lib/views/test/loading.js.map +1 -1
- package/lib/views/test/popin-correction.js +1 -18
- package/lib/views/test/popin-correction.js.map +1 -1
- package/lib/views/test/popin-end.js +1 -10
- package/lib/views/test/popin-end.js.map +1 -1
- package/lib/views/test/router.js +1 -8
- package/lib/views/test/router.js.map +1 -1
- package/lib/views/test/slide.js +3 -23
- package/lib/views/test/slide.js.map +1 -1
- package/package.json +13 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popin-end.js","names":["services","Comments","post","Location","openRecommendation","nextLevel","seeComment","createDispatch","state","getState","action","dispatched","dispatch","maybeAction","push","actionTypes","actions","type","options","translate","mockTranslate","test","t","popinLearnerSuccess","props","popinEnd","header","summary","is","rank","stars","cta","title","true","onClick","falsy","href","dispatchedHeaderCta","deepEqual","LOCATION_NEXT_CONTENT_REQUEST","LOCATION_NEXT_CONTENT_SUCCESS","prefix","buttonCta","button","dispatchedActionCta","comment","edition","postDisabled","isSent","value","onChange","dispatchedOnChange","target","UI_EDIT_COMMENT","onPost","dispatchedOnPost","SEND_POST_COMMENT_REQUEST","SEND_POST_COMMENT_SUCCESS","confirmation","dispatchedOnClick","LOCATION_SEE_COMMENT_REQUEST","LOCATION_SEE_COMMENT_SUCCESS","popinLearnerFailure","subtitle","lives","popinLearnerFailureWithRedirection","popinLearnerSuccessWithRedirection","popinMicrolearningFailure","popinMicrolearningSuccess","popinLearnerAdaptiveFailure","recommendations","recommendation","dispatchedOpenRecommmendation","cards","LOCATION_OPEN_RECOMMENDATION_REQUEST","LOCATION_OPEN_RECOMMENDATION_SUCCESS","ref","progressionId","getCurrentProgressionId","_id","description","mediaDescription","media","mediaUrl","mimeType","subtitles","posters","__v","success","total"],"sources":["../../../src/map-state-to-props/test/popin-end.js"],"sourcesContent":["import test from 'ava';\nimport {get, map, set, pipe, identity, isFunction, isUndefined} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {\n getCurrentProgressionId,\n LOCATION_NEXT_CONTENT_REQUEST,\n LOCATION_NEXT_CONTENT_SUCCESS,\n LOCATION_OPEN_RECOMMENDATION_REQUEST,\n LOCATION_OPEN_RECOMMENDATION_SUCCESS,\n LOCATION_SEE_COMMENT_REQUEST,\n LOCATION_SEE_COMMENT_SUCCESS,\n SEND_POST_COMMENT_REQUEST,\n SEND_POST_COMMENT_SUCCESS,\n UI_EDIT_COMMENT\n} from '@coorpacademy/player-store';\nimport popinEnd from '../popin-end';\n\nimport popinLearnerSuccess from './fixtures/popin-end/learner-success';\nimport popinLearnerSuccessWithRedirection from './fixtures/popin-end/learner-success-with-redirection';\nimport popinLearnerFailure from './fixtures/popin-end/learner-failure';\nimport popinLearnerFailureWithRedirection from './fixtures/popin-end/learner-failure-with-redirection';\nimport popinLearnerAdaptiveFailure from './fixtures/popin-end/learner-adaptive-failure';\nimport popinMicrolearningFailure from './fixtures/popin-end/fail';\nimport popinMicrolearningSuccess from './fixtures/popin-end/success';\n\nconst services = {\n Comments: {\n post: identity\n },\n Location: {\n openRecommendation: identity,\n nextLevel: identity,\n seeComment: identity\n }\n};\n\nconst createDispatch = state => {\n const getState = () => state;\n\n return async action => {\n const dispatched = [];\n const dispatch = maybeAction =>\n isFunction(maybeAction)\n ? maybeAction(dispatch, getState, {services})\n : dispatched.push(maybeAction);\n\n await dispatch(action);\n\n return dispatched;\n };\n};\n\nconst actionTypes = actions => map(({type}) => type, actions);\nconst options = {translate: mockTranslate};\n\ntest('should create a \"Next Level\" CTA after success on learner progression', async t => {\n const dispatch = createDispatch(popinLearnerSuccess);\n const props = popinEnd(options, {dispatch})(popinLearnerSuccess);\n\n const header = props.summary.header;\n t.is(header.rank, '+1');\n t.is(header.stars, '+2');\n t.is(header.type, 'popinEnd');\n\n const cta = header.cta;\n t.is(cta.title, '__Next level');\n t.true(isFunction(cta.onClick));\n t.falsy(cta.href);\n const dispatchedHeaderCta = await cta.onClick();\n t.deepEqual(actionTypes(dispatchedHeaderCta), [\n LOCATION_NEXT_CONTENT_REQUEST,\n LOCATION_NEXT_CONTENT_SUCCESS\n ]);\n\n const action = props.summary.action;\n t.is(action.prefix, '__Next level_');\n t.is(action.title, 'La recherche en ligne - Avancé');\n\n const buttonCta = action.button;\n t.is(buttonCta.title, '__Next level');\n const dispatchedActionCta = await buttonCta.onClick();\n t.deepEqual(actionTypes(dispatchedActionCta), [\n LOCATION_NEXT_CONTENT_REQUEST,\n LOCATION_NEXT_CONTENT_SUCCESS\n ]);\n\n const comment = props.summary.comment;\n t.is(comment.edition.postDisabled, true);\n});\n\ntest('should write, send, and go see a comment after success on learner progression', async t => {\n const state = pipe(\n set('data.comments.entities.idProgression1234.isSent', true),\n set('ui.comments.text', 'textToSend')\n )(popinLearnerSuccess);\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n const comment = props.summary.comment;\n t.is(comment.isSent, true);\n t.is(comment.edition.value, 'textToSend');\n t.is(comment.edition.postDisabled, false);\n\n const onChange = comment.edition.onChange;\n t.true(isFunction(onChange));\n const dispatchedOnChange = await onChange({target: {value: 'foo'}});\n\n t.deepEqual(actionTypes(dispatchedOnChange), [UI_EDIT_COMMENT]);\n\n const onPost = comment.edition.onPost;\n t.true(isFunction(onPost));\n const dispatchedOnPost = await onPost();\n\n t.deepEqual(actionTypes(dispatchedOnPost), [\n SEND_POST_COMMENT_REQUEST,\n SEND_POST_COMMENT_SUCCESS\n ]);\n\n const onClick = comment.confirmation.onClick;\n t.true(isFunction(onClick));\n const dispatchedOnClick = await onClick();\n\n t.deepEqual(actionTypes(dispatchedOnClick), [\n LOCATION_SEE_COMMENT_REQUEST,\n LOCATION_SEE_COMMENT_SUCCESS\n ]);\n});\n\ntest('should not see comment section after failure on learner progression', t => {\n const dispatch = createDispatch(popinLearnerFailure);\n const props = popinEnd(options, {dispatch})(popinLearnerFailure);\n t.is(props.summary.comment, null);\n t.is(props.summary.header.subtitle, '__You are out of lives!');\n t.is(props.summary.header.lives, 0);\n});\n\ntest('should verify that cta should redirect if redirectURLAfterEnd is set on state for failure popin', t => {\n const dispatch = createDispatch(popinLearnerFailureWithRedirection);\n const props = popinEnd(options, {dispatch})(popinLearnerFailureWithRedirection);\n\n const header = props.summary.header;\n const cta = header.cta;\n t.is(cta.title, '__Click to continue');\n t.true(isUndefined(cta.onClick));\n t.is(cta.href, 'http://www.google.com');\n});\n\ntest('should verify that cta should redirect if redirectURLAfterEnd is set on state for success popin', t => {\n const dispatch = createDispatch(popinLearnerSuccessWithRedirection);\n const props = popinEnd(options, {dispatch})(popinLearnerSuccessWithRedirection);\n\n const header = props.summary.header;\n const cta = header.cta;\n t.is(cta.title, '__Click to continue');\n t.true(isUndefined(cta.onClick));\n t.is(cta.href, 'http://www.google.com');\n});\n\ntest('should not see comment section after failure on microlearning progression', t => {\n const dispatch = createDispatch(popinMicrolearningFailure);\n const props = popinEnd(options, {\n dispatch\n })(popinMicrolearningFailure);\n t.is(props.summary.comment, null);\n});\n\ntest('should not see comment section after success on microlearning progression', t => {\n const dispatch = createDispatch(popinMicrolearningSuccess);\n const props = popinEnd(options, {\n dispatch\n })(popinMicrolearningSuccess);\n t.is(props.summary.comment, null);\n});\n\ntest(\"livesDisabled == true ---> should not see lives and 'You are out of lives!' message\", t => {\n const dispatch = createDispatch(popinLearnerAdaptiveFailure);\n const props = popinEnd(options, {dispatch})(popinLearnerAdaptiveFailure);\n\n t.is(props.summary.header.subtitle, '__Nice try!');\n t.is(props.summary.header.lives, null);\n});\n\ntest('should create a \"Back to Home\" CTA after success on learner progression with coach content', async t => {\n const state = pipe(\n set(['data', 'contents', 'level', 'entities', '1.B', 'level'], 'coach'),\n set('data.nextContent.entities.idProgression1234', null)\n )(popinLearnerSuccess);\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n const header = props.summary.header;\n t.is(header.rank, '+1');\n t.is(header.stars, '+2');\n t.is(header.type, 'popinEnd');\n\n const cta = header.cta;\n t.is(cta.title, '__Back to home');\n t.deepEqual(map('type')(await cta.onClick()), [\n '@@location/EXIT_REQUEST',\n '@@location/EXIT_FAILURE'\n ]);\n t.falsy(cta.href);\n\n t.falsy(props.summary.action);\n});\n\ntest('should create a \"Back to Home\" CTA after success on learner progression with content with only base level', async t => {\n const state = set(\n ['data', 'nextContent', 'entities', 'idProgression1234'],\n null,\n popinLearnerSuccess\n );\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n const header = props.summary.header;\n t.is(header.rank, '+1');\n t.is(header.stars, '+2');\n t.is(header.type, 'popinEnd');\n\n const cta = header.cta;\n t.is(cta.title, '__Back to home');\n t.deepEqual(map('type')(await cta.onClick()), [\n '@@location/EXIT_REQUEST',\n '@@location/EXIT_FAILURE'\n ]);\n t.falsy(cta.href);\n});\n\ntest('should create a \"Retry Level\" CTA after failure on learner progression', t => {\n const dispatch = createDispatch(popinLearnerFailure);\n const props = popinEnd(options, {dispatch})(popinLearnerFailure);\n\n const header = props.summary.header;\n t.is(header.rank, '-1');\n t.is(header.type, 'popinEnd');\n\n const cta = props.summary.header.cta;\n t.is(cta.title, '__Retry level');\n t.true(isFunction(cta.onClick));\n t.falsy(cta.href);\n\n const action = props.summary.action;\n t.is(action.prefix, '__Retry level_');\n t.is(action.title, 'La recherche en ligne - Base');\n\n const buttonCta = action.button;\n t.is(buttonCta.title, '__Retry level');\n});\n\ntest('should open recommendation', async t => {\n const dispatch = createDispatch(popinLearnerSuccess);\n const props = popinEnd(options, {dispatch})(popinLearnerSuccess);\n\n const recommendations = props.summary.recommendation;\n\n const dispatchedOpenRecommmendation = await recommendations.cards[0].onClick();\n t.deepEqual(actionTypes(dispatchedOpenRecommmendation), [\n LOCATION_OPEN_RECOMMENDATION_REQUEST,\n LOCATION_OPEN_RECOMMENDATION_SUCCESS\n ]);\n});\n\ntest('should create a \"Retry Chapter\" CTA after failure on microlearning progression', t => {\n const dispatch = createDispatch(popinMicrolearningFailure);\n const props = popinEnd(options, {dispatch})(popinMicrolearningFailure);\n\n const header = props.summary.header;\n t.falsy(header.rank);\n t.falsy(header.stars);\n t.is(header.type, 'popinEnd');\n\n const cta = props.summary.header.cta;\n t.is(cta.title, '__Retry chapter');\n t.true(isFunction(cta.onClick));\n t.falsy(cta.href);\n});\n\ntest('should extract feedback content from exit node', t => {\n const ref = 'biba-exit-node-A';\n const progressionId = getCurrentProgressionId(popinMicrolearningFailure);\n const state = pipe(\n set(`data.exitNodes.entities.${ref}`, {\n ref,\n _id: '5a4e2adbd56b8b7ddab06532',\n type: 'success',\n title: 'biba_exit_node_A.title',\n description: 'biba_exit_node_A.description',\n mediaDescription: 'biba_exit_node_A.media.description',\n media: {\n ref: 'biba_exit_node_A-media',\n type: 'pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl',\n mimeType: 'application/pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n subtitles: 'biba_exit_node_A.media.pdf.subtitles',\n posters: []\n },\n __v: 0\n }),\n set(`data.progressions.entities.${progressionId}.state.nextContent.ref`, ref)\n )(popinMicrolearningFailure);\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n t.deepEqual(get('summary.feedback', props), {\n title: 'biba_exit_node_A.title',\n description: 'biba_exit_node_A.description',\n mediaDescription: 'biba_exit_node_A.media.description',\n media: {\n type: 'pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n mimeType: 'application/pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl'\n }\n });\n});\n\ntest('should extract feedback content from exit node and counters', t => {\n const ref = 'biba-exit-node-A';\n const progressionId = getCurrentProgressionId(popinMicrolearningFailure);\n const state = pipe(\n set(`data.exitNodes.entities.${ref}`, {\n ref,\n _id: '5a4e2adbd56b8b7ddab06532',\n type: 'success',\n title: 'title total: {{ success }}',\n description: 'description {{ success }}/{{ total }}',\n mediaDescription: 'mediaDescription {{ total }}',\n media: {\n ref: 'biba_exit_node_A-media',\n type: 'pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl',\n mimeType: 'application/pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n subtitles: 'biba_exit_node_A.media.pdf.subtitles',\n posters: []\n },\n __v: 0\n }),\n set(`data.progressions.entities.${progressionId}.state.nextContent.ref`, ref),\n set(`data.progressions.entities.${progressionId}.state.variables`, {success: 4, total: 10})\n )(popinMicrolearningFailure);\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n t.deepEqual(get('summary.feedback', props), {\n title: 'title total: 4',\n description: 'description 4/10',\n mediaDescription: 'mediaDescription 10',\n media: {\n type: 'pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n mimeType: 'application/pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl'\n }\n });\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;AAGA;;AACA;;AAYA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAG;EACfC,QAAQ,EAAE;IACRC,IAAI;EADI,CADK;EAIfC,QAAQ,EAAE;IACRC,kBAAkB,oBADV;IAERC,SAAS,oBAFD;IAGRC,UAAU;EAHF;AAJK,CAAjB;;AAWA,MAAMC,cAAc,GAAGC,KAAK,IAAI;EAC9B,MAAMC,QAAQ,GAAG,MAAMD,KAAvB;;EAEA,OAAO,MAAME,MAAN,IAAgB;IACrB,MAAMC,UAAU,GAAG,EAAnB;;IACA,MAAMC,QAAQ,GAAGC,WAAW,IAC1B,0BAAWA,WAAX,IACIA,WAAW,CAACD,QAAD,EAAWH,QAAX,EAAqB;MAACT;IAAD,CAArB,CADf,GAEIW,UAAU,CAACG,IAAX,CAAgBD,WAAhB,CAHN;;IAKA,MAAMD,QAAQ,CAACF,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,KADD;MAEL+D,WAAW,EAAE,wCAFR;MAGLI,QAAQ,EAAE,iBAHL;MAILD,QAAQ,EAAE;IAJL;EAJmC,CAA5C;AAWD,CAvCD"}
|
|
1
|
+
{"version":3,"file":"popin-end.js","names":["_ava","_interopRequireDefault","require","_translate","_playerStore","_popinEnd","_learnerSuccess","_learnerSuccessWithRedirection","_learnerFailure","_learnerFailureWithRedirection","_learnerAdaptiveFailure","_fail","_success","e","__esModule","default","services","Comments","post","_identity2","Location","openRecommendation","nextLevel","seeComment","createDispatch","state","getState","action","dispatched","dispatch","maybeAction","_isFunction2","push","actionTypes","actions","_map2","type","options","translate","mockTranslate","test","t","popinLearnerSuccess","props","popinEnd","header","summary","is","rank","stars","cta","title","true","onClick","falsy","href","dispatchedHeaderCta","deepEqual","LOCATION_NEXT_CONTENT_REQUEST","LOCATION_NEXT_CONTENT_SUCCESS","prefix","buttonCta","button","dispatchedActionCta","comment","edition","postDisabled","_pipe2","_set2","isSent","value","onChange","dispatchedOnChange","target","UI_EDIT_COMMENT","onPost","dispatchedOnPost","SEND_POST_COMMENT_REQUEST","SEND_POST_COMMENT_SUCCESS","confirmation","dispatchedOnClick","LOCATION_SEE_COMMENT_REQUEST","LOCATION_SEE_COMMENT_SUCCESS","popinLearnerFailure","subtitle","lives","popinLearnerFailureWithRedirection","_isUndefined2","popinLearnerSuccessWithRedirection","popinMicrolearningFailure","popinMicrolearningSuccess","popinLearnerAdaptiveFailure","recommendations","recommendation","dispatchedOpenRecommmendation","cards","LOCATION_OPEN_RECOMMENDATION_REQUEST","LOCATION_OPEN_RECOMMENDATION_SUCCESS","ref","progressionId","getCurrentProgressionId","_id","description","mediaDescription","media","mediaUrl","mimeType","subtitles","posters","__v","_get2","success","total"],"sources":["../../../src/map-state-to-props/test/popin-end.js"],"sourcesContent":["import test from 'ava';\nimport {get, map, set, pipe, identity, isFunction, isUndefined} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {\n getCurrentProgressionId,\n LOCATION_NEXT_CONTENT_REQUEST,\n LOCATION_NEXT_CONTENT_SUCCESS,\n LOCATION_OPEN_RECOMMENDATION_REQUEST,\n LOCATION_OPEN_RECOMMENDATION_SUCCESS,\n LOCATION_SEE_COMMENT_REQUEST,\n LOCATION_SEE_COMMENT_SUCCESS,\n SEND_POST_COMMENT_REQUEST,\n SEND_POST_COMMENT_SUCCESS,\n UI_EDIT_COMMENT\n} from '@coorpacademy/player-store';\nimport popinEnd from '../popin-end';\n\nimport popinLearnerSuccess from './fixtures/popin-end/learner-success';\nimport popinLearnerSuccessWithRedirection from './fixtures/popin-end/learner-success-with-redirection';\nimport popinLearnerFailure from './fixtures/popin-end/learner-failure';\nimport popinLearnerFailureWithRedirection from './fixtures/popin-end/learner-failure-with-redirection';\nimport popinLearnerAdaptiveFailure from './fixtures/popin-end/learner-adaptive-failure';\nimport popinMicrolearningFailure from './fixtures/popin-end/fail';\nimport popinMicrolearningSuccess from './fixtures/popin-end/success';\n\nconst services = {\n Comments: {\n post: identity\n },\n Location: {\n openRecommendation: identity,\n nextLevel: identity,\n seeComment: identity\n }\n};\n\nconst createDispatch = state => {\n const getState = () => state;\n\n return async action => {\n const dispatched = [];\n const dispatch = maybeAction =>\n isFunction(maybeAction)\n ? maybeAction(dispatch, getState, {services})\n : dispatched.push(maybeAction);\n\n await dispatch(action);\n\n return dispatched;\n };\n};\n\nconst actionTypes = actions => map(({type}) => type, actions);\nconst options = {translate: mockTranslate};\n\ntest('should create a \"Next Level\" CTA after success on learner progression', async t => {\n const dispatch = createDispatch(popinLearnerSuccess);\n const props = popinEnd(options, {dispatch})(popinLearnerSuccess);\n\n const header = props.summary.header;\n t.is(header.rank, '+1');\n t.is(header.stars, '+2');\n t.is(header.type, 'popinEnd');\n\n const cta = header.cta;\n t.is(cta.title, '__Next level');\n t.true(isFunction(cta.onClick));\n t.falsy(cta.href);\n const dispatchedHeaderCta = await cta.onClick();\n t.deepEqual(actionTypes(dispatchedHeaderCta), [\n LOCATION_NEXT_CONTENT_REQUEST,\n LOCATION_NEXT_CONTENT_SUCCESS\n ]);\n\n const action = props.summary.action;\n t.is(action.prefix, '__Next level_');\n t.is(action.title, 'La recherche en ligne - Avancé');\n\n const buttonCta = action.button;\n t.is(buttonCta.title, '__Next level');\n const dispatchedActionCta = await buttonCta.onClick();\n t.deepEqual(actionTypes(dispatchedActionCta), [\n LOCATION_NEXT_CONTENT_REQUEST,\n LOCATION_NEXT_CONTENT_SUCCESS\n ]);\n\n const comment = props.summary.comment;\n t.is(comment.edition.postDisabled, true);\n});\n\ntest('should write, send, and go see a comment after success on learner progression', async t => {\n const state = pipe(\n set('data.comments.entities.idProgression1234.isSent', true),\n set('ui.comments.text', 'textToSend')\n )(popinLearnerSuccess);\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n const comment = props.summary.comment;\n t.is(comment.isSent, true);\n t.is(comment.edition.value, 'textToSend');\n t.is(comment.edition.postDisabled, false);\n\n const onChange = comment.edition.onChange;\n t.true(isFunction(onChange));\n const dispatchedOnChange = await onChange({target: {value: 'foo'}});\n\n t.deepEqual(actionTypes(dispatchedOnChange), [UI_EDIT_COMMENT]);\n\n const onPost = comment.edition.onPost;\n t.true(isFunction(onPost));\n const dispatchedOnPost = await onPost();\n\n t.deepEqual(actionTypes(dispatchedOnPost), [\n SEND_POST_COMMENT_REQUEST,\n SEND_POST_COMMENT_SUCCESS\n ]);\n\n const onClick = comment.confirmation.onClick;\n t.true(isFunction(onClick));\n const dispatchedOnClick = await onClick();\n\n t.deepEqual(actionTypes(dispatchedOnClick), [\n LOCATION_SEE_COMMENT_REQUEST,\n LOCATION_SEE_COMMENT_SUCCESS\n ]);\n});\n\ntest('should not see comment section after failure on learner progression', t => {\n const dispatch = createDispatch(popinLearnerFailure);\n const props = popinEnd(options, {dispatch})(popinLearnerFailure);\n t.is(props.summary.comment, null);\n t.is(props.summary.header.subtitle, '__You are out of lives!');\n t.is(props.summary.header.lives, 0);\n});\n\ntest('should verify that cta should redirect if redirectURLAfterEnd is set on state for failure popin', t => {\n const dispatch = createDispatch(popinLearnerFailureWithRedirection);\n const props = popinEnd(options, {dispatch})(popinLearnerFailureWithRedirection);\n\n const header = props.summary.header;\n const cta = header.cta;\n t.is(cta.title, '__Click to continue');\n t.true(isUndefined(cta.onClick));\n t.is(cta.href, 'http://www.google.com');\n});\n\ntest('should verify that cta should redirect if redirectURLAfterEnd is set on state for success popin', t => {\n const dispatch = createDispatch(popinLearnerSuccessWithRedirection);\n const props = popinEnd(options, {dispatch})(popinLearnerSuccessWithRedirection);\n\n const header = props.summary.header;\n const cta = header.cta;\n t.is(cta.title, '__Click to continue');\n t.true(isUndefined(cta.onClick));\n t.is(cta.href, 'http://www.google.com');\n});\n\ntest('should not see comment section after failure on microlearning progression', t => {\n const dispatch = createDispatch(popinMicrolearningFailure);\n const props = popinEnd(options, {\n dispatch\n })(popinMicrolearningFailure);\n t.is(props.summary.comment, null);\n});\n\ntest('should not see comment section after success on microlearning progression', t => {\n const dispatch = createDispatch(popinMicrolearningSuccess);\n const props = popinEnd(options, {\n dispatch\n })(popinMicrolearningSuccess);\n t.is(props.summary.comment, null);\n});\n\ntest(\"livesDisabled == true ---> should not see lives and 'You are out of lives!' message\", t => {\n const dispatch = createDispatch(popinLearnerAdaptiveFailure);\n const props = popinEnd(options, {dispatch})(popinLearnerAdaptiveFailure);\n\n t.is(props.summary.header.subtitle, '__Nice try!');\n t.is(props.summary.header.lives, null);\n});\n\ntest('should create a \"Back to Home\" CTA after success on learner progression with coach content', async t => {\n const state = pipe(\n set(['data', 'contents', 'level', 'entities', '1.B', 'level'], 'coach'),\n set('data.nextContent.entities.idProgression1234', null)\n )(popinLearnerSuccess);\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n const header = props.summary.header;\n t.is(header.rank, '+1');\n t.is(header.stars, '+2');\n t.is(header.type, 'popinEnd');\n\n const cta = header.cta;\n t.is(cta.title, '__Back to home');\n t.deepEqual(map('type')(await cta.onClick()), [\n '@@location/EXIT_REQUEST',\n '@@location/EXIT_FAILURE'\n ]);\n t.falsy(cta.href);\n\n t.falsy(props.summary.action);\n});\n\ntest('should create a \"Back to Home\" CTA after success on learner progression with content with only base level', async t => {\n const state = set(\n ['data', 'nextContent', 'entities', 'idProgression1234'],\n null,\n popinLearnerSuccess\n );\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n const header = props.summary.header;\n t.is(header.rank, '+1');\n t.is(header.stars, '+2');\n t.is(header.type, 'popinEnd');\n\n const cta = header.cta;\n t.is(cta.title, '__Back to home');\n t.deepEqual(map('type')(await cta.onClick()), [\n '@@location/EXIT_REQUEST',\n '@@location/EXIT_FAILURE'\n ]);\n t.falsy(cta.href);\n});\n\ntest('should create a \"Retry Level\" CTA after failure on learner progression', t => {\n const dispatch = createDispatch(popinLearnerFailure);\n const props = popinEnd(options, {dispatch})(popinLearnerFailure);\n\n const header = props.summary.header;\n t.is(header.rank, '-1');\n t.is(header.type, 'popinEnd');\n\n const cta = props.summary.header.cta;\n t.is(cta.title, '__Retry level');\n t.true(isFunction(cta.onClick));\n t.falsy(cta.href);\n\n const action = props.summary.action;\n t.is(action.prefix, '__Retry level_');\n t.is(action.title, 'La recherche en ligne - Base');\n\n const buttonCta = action.button;\n t.is(buttonCta.title, '__Retry level');\n});\n\ntest('should open recommendation', async t => {\n const dispatch = createDispatch(popinLearnerSuccess);\n const props = popinEnd(options, {dispatch})(popinLearnerSuccess);\n\n const recommendations = props.summary.recommendation;\n\n const dispatchedOpenRecommmendation = await recommendations.cards[0].onClick();\n t.deepEqual(actionTypes(dispatchedOpenRecommmendation), [\n LOCATION_OPEN_RECOMMENDATION_REQUEST,\n LOCATION_OPEN_RECOMMENDATION_SUCCESS\n ]);\n});\n\ntest('should create a \"Retry Chapter\" CTA after failure on microlearning progression', t => {\n const dispatch = createDispatch(popinMicrolearningFailure);\n const props = popinEnd(options, {dispatch})(popinMicrolearningFailure);\n\n const header = props.summary.header;\n t.falsy(header.rank);\n t.falsy(header.stars);\n t.is(header.type, 'popinEnd');\n\n const cta = props.summary.header.cta;\n t.is(cta.title, '__Retry chapter');\n t.true(isFunction(cta.onClick));\n t.falsy(cta.href);\n});\n\ntest('should extract feedback content from exit node', t => {\n const ref = 'biba-exit-node-A';\n const progressionId = getCurrentProgressionId(popinMicrolearningFailure);\n const state = pipe(\n set(`data.exitNodes.entities.${ref}`, {\n ref,\n _id: '5a4e2adbd56b8b7ddab06532',\n type: 'success',\n title: 'biba_exit_node_A.title',\n description: 'biba_exit_node_A.description',\n mediaDescription: 'biba_exit_node_A.media.description',\n media: {\n ref: 'biba_exit_node_A-media',\n type: 'pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl',\n mimeType: 'application/pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n subtitles: 'biba_exit_node_A.media.pdf.subtitles',\n posters: []\n },\n __v: 0\n }),\n set(`data.progressions.entities.${progressionId}.state.nextContent.ref`, ref)\n )(popinMicrolearningFailure);\n\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n t.deepEqual(get('summary.feedback', props), {\n title: 'biba_exit_node_A.title',\n description: 'biba_exit_node_A.description',\n mediaDescription: 'biba_exit_node_A.media.description',\n media: {\n type: 'pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n mimeType: 'application/pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl'\n }\n });\n});\n\ntest('should extract feedback content from exit node and counters', t => {\n const ref = 'biba-exit-node-A';\n const progressionId = getCurrentProgressionId(popinMicrolearningFailure);\n const state = pipe(\n set(`data.exitNodes.entities.${ref}`, {\n ref,\n _id: '5a4e2adbd56b8b7ddab06532',\n type: 'success',\n title: 'title total: {{ success }}',\n description: 'description {{ success }}/{{ total }}',\n mediaDescription: 'mediaDescription {{ total }}',\n media: {\n ref: 'biba_exit_node_A-media',\n type: 'pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl',\n mimeType: 'application/pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n subtitles: 'biba_exit_node_A.media.pdf.subtitles',\n posters: []\n },\n __v: 0\n }),\n set(`data.progressions.entities.${progressionId}.state.nextContent.ref`, ref),\n set(`data.progressions.entities.${progressionId}.state.variables`, {success: 4, total: 10})\n )(popinMicrolearningFailure);\n const dispatch = createDispatch(state);\n const props = popinEnd(options, {dispatch})(state);\n\n t.deepEqual(get('summary.feedback', props), {\n title: 'title total: 4',\n description: 'description 4/10',\n mediaDescription: 'mediaDescription 10',\n media: {\n type: 'pdf',\n description: 'biba_exit_node_A.media.pdf.description',\n mimeType: 'application/pdf',\n mediaUrl: 'biba_exit_node_A.media.pdf.mediaUrl'\n }\n });\n});\n"],"mappings":";;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAYA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,8BAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,eAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,8BAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,uBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,KAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,QAAA,GAAAX,sBAAA,CAAAC,OAAA;AAAqE,SAAAD,uBAAAY,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErE,MAAMG,QAAQ,GAAG;EACfC,QAAQ,EAAE;IACRC,IAAI,EAAAC,UAAA,CAAAJ;EACN,CAAC;EACDK,QAAQ,EAAE;IACRC,kBAAkB,EAAAF,UAAA,CAAAJ,OAAU;I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B,CAAC;EAC5B,MAAM5D,QAAQ,GAAGL,cAAc,CAACC,KAAK,CAAC;EACtC,MAAMkB,KAAK,GAAG,IAAAC,iBAAQ,EAACP,OAAO,EAAE;IAACR;EAAQ,CAAC,CAAC,CAACJ,KAAK,CAAC;EAElDgB,CAAC,CAACgB,SAAS,CAAC,IAAAqD,KAAA,CAAA/F,OAAA,EAAI,kBAAkB,EAAE4B,KAAK,CAAC,EAAE;IAC1CQ,KAAK,EAAE,gBAAgB;IACvBmD,WAAW,EAAE,kBAAkB;IAC/BC,gBAAgB,EAAE,qBAAqB;IACvCC,KAAK,EAAE;MACLpE,IAAI,EAAE,KAAK;MACXkE,WAAW,EAAE,wCAAwC;MACrDI,QAAQ,EAAE,iBAAiB;MAC3BD,QAAQ,EAAE;IACZ;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _omit2 = _interopRequireDefault(require("lodash/fp/omit"));
|
|
4
|
-
|
|
5
4
|
var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
|
|
6
|
-
|
|
7
5
|
var _ava = _interopRequireDefault(require("ava"));
|
|
8
|
-
|
|
9
6
|
var _errorPopin = _interopRequireDefault(require("../error-popin"));
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
8
|
(0, _ava.default)('should return error popin props if any call fails', t => {
|
|
14
9
|
t.plan(2);
|
|
15
10
|
global.window = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popin-error.js","names":["test","t","plan","global","window","location","reload","pass","props","mapStateToErrorPopinProps","dispatch","data","progressions","isFailure","deepEqual","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","contents","level","is","undefined"],"sources":["../../../src/map-state-to-props/test/popin-error.js"],"sourcesContent":["import test from 'ava';\n\nimport {identity, omit} from 'lodash/fp';\n\nimport mapStateToErrorPopinProps from '../error-popin';\n\ntest('should return error popin props if any call fails', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n progressions: {\n isFailure: true\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\ntest('should return error popin props if content calls fail', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n contents: {\n level: {\n isFailure: true\n }\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\ntest('should not return error popin props', t => {\n const props = mapStateToErrorPopinProps({dispatch: identity})({});\n\n t.is(props, undefined);\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"popin-error.js","names":["_ava","_interopRequireDefault","require","_errorPopin","e","__esModule","default","test","t","plan","global","window","location","reload","pass","props","mapStateToErrorPopinProps","dispatch","_identity2","data","progressions","isFailure","deepEqual","_omit2","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","contents","level","is","undefined"],"sources":["../../../src/map-state-to-props/test/popin-error.js"],"sourcesContent":["import test from 'ava';\n\nimport {identity, omit} from 'lodash/fp';\n\nimport mapStateToErrorPopinProps from '../error-popin';\n\ntest('should return error popin props if any call fails', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n progressions: {\n isFailure: true\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\ntest('should return error popin props if content calls fail', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n contents: {\n level: {\n isFailure: true\n }\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\ntest('should not return error popin props', t => {\n const props = mapStateToErrorPopinProps({dispatch: identity})({});\n\n t.is(props, undefined);\n});\n"],"mappings":";;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAuD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvD,IAAAG,YAAI,EAAC,mDAAmD,EAAEC,CAAC,IAAI;EAC7DA,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC;EACTC,MAAM,CAACC,MAAM,GAAG;IACdC,QAAQ,EAAE;MACRC,MAAM,EAAEA,CAAA,KAAM;QACZL,CAAC,CAACM,IAAI,CAAC,CAAC;MACV;IACF;EAC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Ae,EAAE,sCAAsC;IACvDC,WAAW,EAAE;MACXC,WAAW,EAAE,IAAI;MACjBC,KAAK,EAAE,QAAQ;MACfC,IAAI,EAAE,SAAS;MACf,YAAY,EAAE;IAChB;EACF,CAAC,CAAC;EACFhB,KAAK,CAACa,WAAW,CAACI,aAAa,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,IAAAzB,YAAI,EAAC,qCAAqC,EAAEC,CAAC,IAAI;EAC/C,MAAMO,KAAK,GAAG,IAAAC,mBAAyB,EAAC;IAACC,QAAQ,EAAAC,UAAA,CAAAZ;EAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EAEjEE,CAAC,CAAC2B,EAAE,CAACpB,KAAK,EAAEqB,SAAS,CAAC;AACxB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
|
|
4
|
-
|
|
5
4
|
var _isArray2 = _interopRequireDefault(require("lodash/fp/isArray"));
|
|
6
|
-
|
|
7
5
|
var _ava = _interopRequireDefault(require("ava"));
|
|
8
|
-
|
|
9
6
|
var _translate = require("@coorpacademy/translate");
|
|
10
|
-
|
|
11
7
|
var _playerStore = require("@coorpacademy/player-store");
|
|
12
|
-
|
|
13
8
|
var _resources = _interopRequireDefault(require("../resources"));
|
|
14
|
-
|
|
15
9
|
var _videos = _interopRequireDefault(require("./fixtures/slides/videos"));
|
|
16
|
-
|
|
17
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
11
|
const options = {
|
|
20
12
|
translate: _translate.mockTranslate
|
|
21
13
|
};
|
|
@@ -23,14 +15,12 @@ const store = {
|
|
|
23
15
|
dispatch: _identity2.default
|
|
24
16
|
};
|
|
25
17
|
const getResourcesProps = (0, _resources.default)(options, store);
|
|
26
|
-
|
|
27
18
|
const createAssertVideoShape = t => video => {
|
|
28
19
|
t.truthy(video.videoId);
|
|
29
20
|
t.truthy(video.description);
|
|
30
21
|
t.truthy(video.mimeType);
|
|
31
22
|
t.truthy(video.onClick);
|
|
32
23
|
};
|
|
33
|
-
|
|
34
24
|
(0, _ava.default)('should create list of videos', t => {
|
|
35
25
|
const slide = (0, _playerStore.getCurrentSlide)(_videos.default);
|
|
36
26
|
const props = getResourcesProps(_videos.default, slide);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","names":["options","translate","mockTranslate","store","dispatch","getResourcesProps","creategetResourcesProps","createAssertVideoShape","t","video","truthy","videoId","description","mimeType","onClick","test","slide","getCurrentSlide","unselected","props","assertVideoShape","true","is","length","forEach"],"sources":["../../../src/map-state-to-props/test/resources.js"],"sourcesContent":["import test from 'ava';\nimport {isArray, identity} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {getCurrentSlide} from '@coorpacademy/player-store';\nimport creategetResourcesProps from '../resources';\nimport unselected from './fixtures/slides/videos';\n\nconst options = {translate: mockTranslate};\nconst store = {dispatch: identity};\nconst getResourcesProps = creategetResourcesProps(options, store);\n\nconst createAssertVideoShape = t => video => {\n t.truthy(video.videoId);\n t.truthy(video.description);\n t.truthy(video.mimeType);\n t.truthy(video.onClick);\n};\n\ntest('should create list of videos', t => {\n const slide = getCurrentSlide(unselected);\n const props = getResourcesProps(unselected, slide);\n const assertVideoShape = createAssertVideoShape(t);\n\n t.true(isArray(props));\n t.is(props.length, 2);\n\n props.forEach(assertVideoShape);\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"resources.js","names":["_ava","_interopRequireDefault","require","_translate","_playerStore","_resources","_videos","e","__esModule","default","options","translate","mockTranslate","store","dispatch","_identity2","getResourcesProps","creategetResourcesProps","createAssertVideoShape","t","video","truthy","videoId","description","mimeType","onClick","test","slide","getCurrentSlide","unselected","props","assertVideoShape","true","_isArray2","is","length","forEach"],"sources":["../../../src/map-state-to-props/test/resources.js"],"sourcesContent":["import test from 'ava';\nimport {isArray, identity} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {getCurrentSlide} from '@coorpacademy/player-store';\nimport creategetResourcesProps from '../resources';\nimport unselected from './fixtures/slides/videos';\n\nconst options = {translate: mockTranslate};\nconst store = {dispatch: identity};\nconst getResourcesProps = creategetResourcesProps(options, store);\n\nconst createAssertVideoShape = t => video => {\n t.truthy(video.videoId);\n t.truthy(video.description);\n t.truthy(video.mimeType);\n t.truthy(video.onClick);\n};\n\ntest('should create list of videos', t => {\n const slide = getCurrentSlide(unselected);\n const props = getResourcesProps(unselected, slide);\n const assertVideoShape = createAssertVideoShape(t);\n\n t.true(isArray(props));\n t.is(props.length, 2);\n\n props.forEach(assertVideoShape);\n});\n"],"mappings":";;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAkD,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElD,MAAMG,OAAO,GAAG;EAACC,SAAS,EAAEC;AAAa,CAAC;AAC1C,MAAMC,KAAK,GAAG;EAACC,QAAQ,EAAAC,UAAA,CAAAN;AAAU,CAAC;AAClC,MAAMO,iBAAiB,GAAG,IAAAC,kBAAuB,EAACP,OAAO,EAAEG,KAAK,CAAC;AAEjE,MAAMK,sBAAsB,GAAGC,CAAC,IAAIC,KAAK,IAAI;EAC3CD,CAAC,CAACE,MAAM,CAACD,KAAK,CAACE,OAAO,CAAC;EACvBH,CAAC,CAACE,MAAM,CAACD,KAAK,CAACG,WAAW,CAAC;EAC3BJ,CAAC,CAACE,MAAM,CAACD,KAAK,CAACI,QAAQ,CAAC;EACxBL,CAAC,CAACE,MAAM,CAACD,KAAK,CAACK,OAAO,CAAC;AACzB,CAAC;AAED,IAAAC,YAAI,EAAC,8BAA8B,EAAEP,CAAC,IAAI;EACxC,MAAMQ,KAAK,GAAG,IAAAC,4BAAe,EAACC,eAAU,CAAC;EACzC,MAAMC,KAAK,GAAGd,iBAAiB,CAACa,eAAU,EAAEF,KAAK,CAAC;EAClD,MAAMI,gBAAgB,GAAGb,sBAAsB,CAACC,CAAC,CAAC;EAElDA,CAAC,CAACa,IAAI,CAAC,IAAAC,SAAA,CAAAxB,OAAA,EAAQqB,KAAK,CAAC,CAAC;EACtBX,CAAC,CAACe,EAAE,CAACJ,KAAK,CAACK,MAAM,EAAE,CAAC,CAAC;EAErBL,KAAK,CAACM,OAAO,CAACL,gBAAgB,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
|
package/lib/run-app.js
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _playerStore = require("@coorpacademy/player-store");
|
|
7
|
-
|
|
8
6
|
const start = ({
|
|
9
7
|
progression
|
|
10
8
|
}, {
|
|
@@ -13,7 +11,5 @@ const start = ({
|
|
|
13
11
|
dispatch((0, _playerStore.setRedirectUrlEnd)());
|
|
14
12
|
return dispatch((0, _playerStore.selectProgression)(progression));
|
|
15
13
|
};
|
|
16
|
-
|
|
17
|
-
var _default = start;
|
|
18
|
-
exports.default = _default;
|
|
14
|
+
var _default = exports.default = start;
|
|
19
15
|
//# sourceMappingURL=run-app.js.map
|
package/lib/run-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-app.js","names":["start","progression","dispatch","setRedirectUrlEnd","selectProgression"],"sources":["../src/run-app.js"],"sourcesContent":["import {selectProgression, setRedirectUrlEnd} from '@coorpacademy/player-store';\n\nconst start = ({progression}, {dispatch}) => {\n dispatch(setRedirectUrlEnd());\n return dispatch(selectProgression(progression));\n};\n\nexport default start;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-app.js","names":["_playerStore","require","start","progression","dispatch","setRedirectUrlEnd","selectProgression","_default","exports","default"],"sources":["../src/run-app.js"],"sourcesContent":["import {selectProgression, setRedirectUrlEnd} from '@coorpacademy/player-store';\n\nconst start = ({progression}, {dispatch}) => {\n dispatch(setRedirectUrlEnd());\n return dispatch(selectProgression(progression));\n};\n\nexport default start;\n"],"mappings":";;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,KAAK,GAAGA,CAAC;EAACC;AAAW,CAAC,EAAE;EAACC;AAAQ,CAAC,KAAK;EAC3CA,QAAQ,CAAC,IAAAC,8BAAiB,EAAC,CAAC,CAAC;EAC7B,OAAOD,QAAQ,CAAC,IAAAE,8BAAiB,EAACH,WAAW,CAAC,CAAC;AACjD,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaP,KAAK","ignoreList":[]}
|
package/lib/store.js
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports.createReducers = exports.createMiddlewares = void 0;
|
|
5
|
-
|
|
6
5
|
var _redux = require("redux");
|
|
7
|
-
|
|
8
6
|
var _playerStore = require("@coorpacademy/player-store");
|
|
9
|
-
|
|
10
7
|
const {
|
|
11
8
|
ErrorLogger,
|
|
12
9
|
ReduxThunkMemoized
|
|
@@ -15,22 +12,15 @@ const {
|
|
|
15
12
|
data,
|
|
16
13
|
ui
|
|
17
14
|
} = _playerStore.reducers;
|
|
18
|
-
|
|
19
15
|
const createReducers = () => (0, _redux.combineReducers)({
|
|
20
16
|
data,
|
|
21
17
|
ui
|
|
22
18
|
});
|
|
23
|
-
|
|
24
19
|
exports.createReducers = createReducers;
|
|
25
|
-
|
|
26
20
|
const createMiddlewares = options => {
|
|
27
21
|
return (0, _redux.compose)((0, _redux.applyMiddleware)(ReduxThunkMemoized(options), ErrorLogger(options)), typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f);
|
|
28
22
|
};
|
|
29
|
-
|
|
30
23
|
exports.createMiddlewares = createMiddlewares;
|
|
31
|
-
|
|
32
24
|
const create = options => (0, _redux.createStore)(createReducers(), {}, createMiddlewares(options));
|
|
33
|
-
|
|
34
|
-
var _default = create;
|
|
35
|
-
exports.default = _default;
|
|
25
|
+
var _default = exports.default = create;
|
|
36
26
|
//# sourceMappingURL=store.js.map
|
package/lib/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","names":["ErrorLogger","ReduxThunkMemoized","middlewares","data","ui","reducers","createReducers","combineReducers","createMiddlewares","options","compose","applyMiddleware","window","__REDUX_DEVTOOLS_EXTENSION__","f","create","createStore"],"sources":["../src/store.js"],"sourcesContent":["import {applyMiddleware, combineReducers, compose, createStore} from 'redux';\nimport {middlewares, reducers} from '@coorpacademy/player-store';\n\nconst {ErrorLogger, ReduxThunkMemoized} = middlewares;\nconst {data, ui} = reducers;\n\nconst createReducers = () =>\n combineReducers({\n data,\n ui\n });\n\nconst createMiddlewares = options => {\n return compose(\n applyMiddleware(ReduxThunkMemoized(options), ErrorLogger(options)),\n typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__\n ? window.__REDUX_DEVTOOLS_EXTENSION__()\n : f => f\n );\n};\n\nconst create = options => createStore(createReducers(), {}, createMiddlewares(options));\nexport {createMiddlewares, createReducers};\nexport default create;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.js","names":["_redux","require","_playerStore","ErrorLogger","ReduxThunkMemoized","middlewares","data","ui","reducers","createReducers","combineReducers","exports","createMiddlewares","options","compose","applyMiddleware","window","__REDUX_DEVTOOLS_EXTENSION__","f","create","createStore","_default","default"],"sources":["../src/store.js"],"sourcesContent":["import {applyMiddleware, combineReducers, compose, createStore} from 'redux';\nimport {middlewares, reducers} from '@coorpacademy/player-store';\n\nconst {ErrorLogger, ReduxThunkMemoized} = middlewares;\nconst {data, ui} = reducers;\n\nconst createReducers = () =>\n combineReducers({\n data,\n ui\n });\n\nconst createMiddlewares = options => {\n return compose(\n applyMiddleware(ReduxThunkMemoized(options), ErrorLogger(options)),\n typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__\n ? window.__REDUX_DEVTOOLS_EXTENSION__()\n : f => f\n );\n};\n\nconst create = options => createStore(createReducers(), {}, createMiddlewares(options));\nexport {createMiddlewares, createReducers};\nexport default create;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,MAAM;EAACE,WAAW;EAAEC;AAAkB,CAAC,GAAGC,wBAAW;AACrD,MAAM;EAACC,IAAI;EAAEC;AAAE,CAAC,GAAGC,qBAAQ;AAE3B,MAAMC,cAAc,GAAGA,CAAA,KACrB,IAAAC,sBAAe,EAAC;EACdJ,IAAI;EACJC;AACF,CAAC,CAAC;AAACI,OAAA,CAAAF,cAAA,GAAAA,cAAA;AAEL,MAAMG,iBAAiB,GAAGC,OAAO,IAAI;EACnC,OAAO,IAAAC,cAAO,EACZ,IAAAC,sBAAe,EAACX,kBAAkB,CAACS,OAAO,CAAC,EAAEV,WAAW,CAACU,OAAO,CAAC,CAAC,EAClE,OAAOG,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACC,4BAA4B,GAChED,MAAM,CAACC,4BAA4B,CAAC,CAAC,GACrCC,CAAC,IAAIA,CACX,CAAC;AACH,CAAC;AAACP,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAEF,MAAMO,MAAM,GAAGN,OAAO,IAAI,IAAAO,kBAAW,EAACX,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAEG,iBAAiB,CAACC,OAAO,CAAC,CAAC;AAAC,IAAAQ,QAAA,GAAAV,OAAA,CAAAW,OAAA,GAEzEH,MAAM","ignoreList":[]}
|
package/lib/test/add-timeout.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
-
|
|
5
4
|
var _services = require("../../sandbox/services");
|
|
6
|
-
|
|
7
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
-
|
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
6
|
(0, _ava.default)("should delay promise's fulfillment", async t => {
|
|
10
7
|
const fun = (0, _services.addTimeout)(0, () => Promise.resolve());
|
|
11
8
|
await fun();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-timeout.js","names":["test","t","fun","addTimeout","Promise","resolve","pass"],"sources":["../../src/test/add-timeout.js"],"sourcesContent":["import test from 'ava';\nimport {addTimeout} from '../../sandbox/services';\n\ntest(\"should delay promise's fulfillment\", async t => {\n const fun = addTimeout(0, () => Promise.resolve());\n await fun();\n t.pass();\n});\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"add-timeout.js","names":["_ava","_interopRequireDefault","require","_services","e","__esModule","default","test","t","fun","addTimeout","Promise","resolve","pass"],"sources":["../../src/test/add-timeout.js"],"sourcesContent":["import test from 'ava';\nimport {addTimeout} from '../../sandbox/services';\n\ntest(\"should delay promise's fulfillment\", async t => {\n const fun = addTimeout(0, () => Promise.resolve());\n await fun();\n t.pass();\n});\n"],"mappings":";;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAAkD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElD,IAAAG,YAAI,EAAC,oCAAoC,EAAE,MAAMC,CAAC,IAAI;EACpD,MAAMC,GAAG,GAAG,IAAAC,oBAAU,EAAC,CAAC,EAAE,MAAMC,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;EAClD,MAAMH,GAAG,CAAC,CAAC;EACXD,CAAC,CAACK,IAAI,CAAC,CAAC;AACV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _cssModulesRequireHook = _interopRequireDefault(require("@coorpacademy/css-modules-require-hook"));
|
|
4
|
-
|
|
5
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
|
-
|
|
4
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
5
|
(0, _cssModulesRequireHook.default)();
|
|
8
6
|
//# sourceMappingURL=css-register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-register.js","names":["cssRegister"],"sources":["../../../src/test/helpers/css-register.js"],"sourcesContent":["import cssRegister from '@coorpacademy/css-modules-require-hook';\n\ncssRegister();\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"css-register.js","names":["_cssModulesRequireHook","_interopRequireDefault","require","e","__esModule","default","cssRegister"],"sources":["../../../src/test/helpers/css-register.js"],"sourcesContent":["import cssRegister from '@coorpacademy/css-modules-require-hook';\n\ncssRegister();\n"],"mappings":";;AAAA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiE,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjE,IAAAG,8BAAW,EAAC,CAAC","ignoreList":[]}
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
const macro = (t, reducer, state, action, expected) => {
|
|
7
6
|
t.deepEqual(reducer(Object.freeze(state), Object.freeze(action)), Object.freeze(expected));
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
var _default = macro;
|
|
11
|
-
exports.default = _default;
|
|
8
|
+
var _default = exports.default = macro;
|
|
12
9
|
//# sourceMappingURL=macro.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macro.js","names":["macro","t","reducer","state","action","expected","deepEqual","Object","freeze"],"sources":["../../../src/test/helpers/macro.js"],"sourcesContent":["const macro = (t, reducer, state, action, expected) => {\n t.deepEqual(reducer(Object.freeze(state), Object.freeze(action)), Object.freeze(expected));\n};\n\nexport default macro;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"macro.js","names":["macro","t","reducer","state","action","expected","deepEqual","Object","freeze","_default","exports","default"],"sources":["../../../src/test/helpers/macro.js"],"sourcesContent":["const macro = (t, reducer, state, action, expected) => {\n t.deepEqual(reducer(Object.freeze(state), Object.freeze(action)), Object.freeze(expected));\n};\n\nexport default macro;\n"],"mappings":";;;;AAAA,MAAMA,KAAK,GAAGA,CAACC,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,KAAK;EACrDJ,CAAC,CAACK,SAAS,CAACJ,OAAO,CAACK,MAAM,CAACC,MAAM,CAACL,KAAK,CAAC,EAAEI,MAAM,CAACC,MAAM,CAACJ,MAAM,CAAC,CAAC,EAAEG,MAAM,CAACC,MAAM,CAACH,QAAQ,CAAC,CAAC;AAC5F,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaX,KAAK","ignoreList":[]}
|
package/lib/test/index.js
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
-
|
|
5
4
|
var _browserEnv = _interopRequireDefault(require("browser-env"));
|
|
6
|
-
|
|
7
5
|
var _translate = require("@coorpacademy/translate");
|
|
8
|
-
|
|
9
6
|
var _playerServices = require("@coorpacademy/player-services");
|
|
10
|
-
|
|
11
7
|
var fixtures = _interopRequireWildcard(require("../../sandbox/fixtures"));
|
|
12
|
-
|
|
13
8
|
var _ = require("..");
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
12
|
const services = {
|
|
22
13
|
Analytics: _playerServices.Analytics,
|
|
23
14
|
Answers: (0, _playerServices.Answers)(fixtures),
|
package/lib/test/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["services","Analytics","AnalyticsService","Answers","AnswersService","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_ava","_interopRequireDefault","require","_browserEnv","_translate","_playerServices","fixtures","_interopRequireWildcard","_","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","services","Analytics","AnalyticsService","Answers","AnswersService","Clues","CluesService","Coach","CoachService","Comments","CommentsService","Content","ContentService","ExitNodes","ExitNodesService","LeaderBoard","LeaderBoardService","Location","LocationService","Logger","console","Progressions","ProgressionsService","Recommendations","RecommendationsService","browserEnv","test","el","document","createElement","app","create","translate","mockTranslate","container","progression","updateCoaches","chatStarted","coachForDiscipline","selectProgression","update","unsubscribe","pass"],"sources":["../../src/test/index.js"],"sourcesContent":["import test from 'ava';\nimport browserEnv from 'browser-env';\nimport {mockTranslate} from '@coorpacademy/translate';\n\nimport {\n Analytics as AnalyticsService,\n Answers as AnswersService,\n Clues as CluesService,\n Coach as CoachService,\n Comments as CommentsService,\n Content as ContentService,\n ExitNodes as ExitNodesService,\n LeaderBoard as LeaderBoardService,\n Location as LocationService,\n Progressions as ProgressionsService,\n Recommendations as RecommendationsService\n} from '@coorpacademy/player-services';\n\nimport * as fixtures from '../../sandbox/fixtures';\nimport {create} from '..';\n\nconst services = {\n Analytics: AnalyticsService,\n Answers: AnswersService(fixtures),\n Clues: CluesService(fixtures),\n Coach: CoachService,\n Comments: CommentsService,\n Content: ContentService(fixtures),\n ExitNodes: ExitNodesService(fixtures),\n LeaderBoard: LeaderBoardService,\n Location: LocationService,\n Logger: console,\n Progressions: ProgressionsService(fixtures),\n Recommendations: RecommendationsService(fixtures)\n};\n\nbrowserEnv(['window', 'document', 'navigator']);\n\ntest('should create app', async t => {\n const el = document.createElement('div');\n const app = create({\n translate: mockTranslate,\n container: el,\n services,\n progression: '0'\n });\n\n await app.updateCoaches({\n chatStarted: false,\n coachForDiscipline: []\n });\n\n await app.selectProgression('1');\n\n app.update();\n app.unsubscribe();\n t.pass();\n});\n"],"mappings":";;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAcA,IAAAI,QAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,CAAA,GAAAN,OAAA;AAA0B,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,C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xBC,SAAS,EAAEP,EAAE;IACb3B,QAAQ;IACRmC,WAAW,EAAE;EACf,CAAC,CAAC;EAEF,MAAML,GAAG,CAACM,aAAa,CAAC;IACtBC,WAAW,EAAE,KAAK;IAClBC,kBAAkB,EAAE;EACtB,CAAC,CAAC;EAEF,MAAMR,GAAG,CAACS,iBAAiB,CAAC,GAAG,CAAC;EAEhCT,GAAG,CAACU,MAAM,CAAC,CAAC;EACZV,GAAG,CAACW,WAAW,CAAC,CAAC;EACjBzD,CAAC,CAAC0D,IAAI,CAAC,CAAC;AACV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
-
|
|
5
4
|
var _store = require("../store");
|
|
6
|
-
|
|
7
5
|
var _macro = _interopRequireDefault(require("./helpers/macro"));
|
|
8
|
-
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
7
|
(0, _ava.default)('should have initial value', _macro.default, (0, _store.createReducers)(), undefined, {}, {
|
|
12
8
|
data: {
|
|
13
9
|
answers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-reducers.js","names":["test","macro","createReducers","undefined","data","answers","entities","comments","configs","contents","clues","exitNodes","progressions","rank","nextContent","recommendations","videos","ui","coaches","availableCoaches","text","corrections","current","progressionId","location","route"],"sources":["../../src/test/init-reducers.js"],"sourcesContent":["import test from 'ava';\nimport {createReducers} from '../store';\nimport macro from './helpers/macro';\n\ntest(\n 'should have initial value',\n macro,\n createReducers(),\n undefined,\n {},\n {\n data: {\n answers: {entities: {}},\n comments: {entities: {}},\n configs: {},\n contents: {},\n clues: {entities: {}},\n exitNodes: {entities: {}},\n progressions: {entities: {}},\n rank: {},\n nextContent: {entities: {}},\n recommendations: {entities: {}},\n videos: {entities: {}}\n },\n ui: {\n answers: {},\n coaches: {\n availableCoaches: 0\n },\n comments: {\n text: null\n },\n corrections: {},\n current: {\n progressionId: null\n },\n location: {},\n route: {}\n }\n }\n);\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"init-reducers.js","names":["_ava","_interopRequireDefault","require","_store","_macro","e","__esModule","default","test","macro","createReducers","undefined","data","answers","entities","comments","configs","contents","clues","exitNodes","progressions","rank","nextContent","recommendations","videos","ui","coaches","availableCoaches","text","corrections","current","progressionId","location","route"],"sources":["../../src/test/init-reducers.js"],"sourcesContent":["import test from 'ava';\nimport {createReducers} from '../store';\nimport macro from './helpers/macro';\n\ntest(\n 'should have initial value',\n macro,\n createReducers(),\n undefined,\n {},\n {\n data: {\n answers: {entities: {}},\n comments: {entities: {}},\n configs: {},\n contents: {},\n clues: {entities: {}},\n exitNodes: {entities: {}},\n progressions: {entities: {}},\n rank: {},\n nextContent: {entities: {}},\n recommendations: {entities: {}},\n videos: {entities: {}}\n },\n ui: {\n answers: {},\n coaches: {\n availableCoaches: 0\n },\n comments: {\n text: null\n },\n corrections: {},\n current: {\n progressionId: null\n },\n location: {},\n route: {}\n }\n }\n);\n"],"mappings":";;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEpC,IAAAG,YAAI,EACF,2BAA2B,EAC3BC,cAAK,EACL,IAAAC,qBAAc,EAAC,CAAC,EAChBC,SAAS,EACT,CAAC,CAAC,EACF;EACEC,IAAI,EAAE;IACJC,OAAO,EAAE;MAACC,QAAQ,EAAE,CAAC;IAAC,CAAC;IACvBC,QAAQ,EAAE;MAACD,QAAQ,EAAE,CAAC;IAAC,CAAC;IACxBE,OAAO,EAAE,CAAC,CAAC;IACXC,QAAQ,EAAE,CAAC,CAAC;IACZC,KAAK,EAAE;MAACJ,QAAQ,EAAE,CAAC;IAAC,CAAC;IACrBK,SAAS,EAAE;MAACL,QAAQ,EAAE,CAAC;IAAC,CAAC;IACzBM,YAAY,EAAE;MAACN,QAAQ,EAAE,CAAC;IAAC,CAAC;IAC5BO,IAAI,EAAE,CAAC,CAAC;IACRC,WAAW,EAAE;MAACR,QAAQ,EAAE,CAAC;IAAC,CAAC;IAC3BS,eAAe,EAAE;MAACT,QAAQ,EAAE,CAAC;IAAC,CAAC;IAC/BU,MAAM,EAAE;MAACV,QAAQ,EAAE,CAAC;IAAC;EACvB,CAAC;EACDW,EAAE,EAAE;IACFZ,OAAO,EAAE,CAAC,CAAC;IACXa,OAAO,EAAE;MACPC,gBAAgB,EAAE;IACpB,CAAC;IACDZ,QAAQ,EAAE;MACRa,IAAI,EAAE;IACR,CAAC;IACDC,WAAW,EAAE,CAAC,CAAC;IACfC,OAAO,EAAE;MACPC,aAAa,EAAE;IACjB,CAAC;IACDC,QAAQ,EAAE,CAAC,CAAC;IACZC,KAAK,EAAE,CAAC;EACV;AACF,CACF,CAAC","ignoreList":[]}
|
package/lib/test/locales.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _path = _interopRequireDefault(require("path"));
|
|
4
|
-
|
|
5
4
|
var _ava = _interopRequireDefault(require("ava"));
|
|
6
|
-
|
|
7
5
|
var _glob = _interopRequireDefault(require("glob"));
|
|
8
|
-
|
|
9
6
|
var _player = _interopRequireDefault(require("../../locales/en/player"));
|
|
10
|
-
|
|
11
7
|
var _locales = _interopRequireDefault(require("../../../../test/helpers/locales"));
|
|
12
|
-
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
9
|
const files = _glob.default.sync(_path.default.join(__dirname, '../**/*.js')).filter(file => !file.includes('/test/'));
|
|
16
|
-
|
|
17
10
|
(0, _ava.default)('All locale keys should be used, and used properly', _locales.default, __dirname, files, _player.default);
|
|
18
11
|
//# sourceMappingURL=locales.js.map
|
package/lib/test/locales.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.js","names":["files","glob","sync","path","join","__dirname","filter","file","includes","test","localesUseMacro","locales"],"sources":["../../src/test/locales.js"],"sourcesContent":["import path from 'path';\nimport test from 'ava';\nimport glob from 'glob';\nimport locales from '../../locales/en/player';\nimport localesUseMacro from '../../../../test/helpers/locales';\n\nconst files = glob\n .sync(path.join(__dirname, '../**/*.js'))\n .filter(file => !file.includes('/test/'));\n\ntest(\n 'All locale keys should be used, and used properly',\n localesUseMacro,\n __dirname,\n files,\n locales\n);\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"locales.js","names":["_path","_interopRequireDefault","require","_ava","_glob","_player","_locales","e","__esModule","default","files","glob","sync","path","join","__dirname","filter","file","includes","test","localesUseMacro","locales"],"sources":["../../src/test/locales.js"],"sourcesContent":["import path from 'path';\nimport test from 'ava';\nimport glob from 'glob';\nimport locales from '../../locales/en/player';\nimport localesUseMacro from '../../../../test/helpers/locales';\n\nconst files = glob\n .sync(path.join(__dirname, '../**/*.js'))\n .filter(file => !file.includes('/test/'));\n\ntest(\n 'All locale keys should be used, and used properly',\n localesUseMacro,\n __dirname,\n files,\n locales\n);\n"],"mappings":";;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA+D,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/D,MAAMG,KAAK,GAAGC,aAAI,CACfC,IAAI,CAACC,aAAI,CAACC,IAAI,CAACC,SAAS,EAAE,YAAY,CAAC,CAAC,CACxCC,MAAM,CAACC,IAAI,IAAI,CAACA,IAAI,CAACC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAE3C,IAAAC,YAAI,EACF,mDAAmD,EACnDC,gBAAe,EACfL,SAAS,EACTL,KAAK,EACLW,eACF,CAAC","ignoreList":[]}
|
package/lib/test/run-app.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _isFunction2 = _interopRequireDefault(require("lodash/fp/isFunction"));
|
|
4
|
-
|
|
5
4
|
var _ava = _interopRequireDefault(require("ava"));
|
|
6
|
-
|
|
7
5
|
var _runApp = _interopRequireDefault(require("../run-app"));
|
|
8
|
-
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
7
|
(0, _ava.default)('it should run app', t => {
|
|
12
8
|
const options = {
|
|
13
9
|
progression: {
|
package/lib/test/run-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-app.js","names":["test","t","options","progression","id","plan","store","dispatch","action","true","app","runApp","is"],"sources":["../../src/test/run-app.js"],"sourcesContent":["import test from 'ava';\nimport {isFunction} from 'lodash/fp';\nimport runApp from '../run-app';\n\ntest('it should run app', t => {\n const options = {\n progression: {\n id: 'foo'\n }\n };\n\n t.plan(3);\n const store = {\n dispatch: action => {\n t.true(isFunction(action));\n return 'bar';\n }\n };\n\n const app = runApp(options, store);\n t.is(app, 'bar');\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-app.js","names":["_ava","_interopRequireDefault","require","_runApp","e","__esModule","default","test","t","options","progression","id","plan","store","dispatch","action","true","_isFunction2","app","runApp","is"],"sources":["../../src/test/run-app.js"],"sourcesContent":["import test from 'ava';\nimport {isFunction} from 'lodash/fp';\nimport runApp from '../run-app';\n\ntest('it should run app', t => {\n const options = {\n progression: {\n id: 'foo'\n }\n };\n\n t.plan(3);\n const store = {\n dispatch: action => {\n t.true(isFunction(action));\n return 'bar';\n }\n };\n\n const app = runApp(options, store);\n t.is(app, 'bar');\n});\n"],"mappings":";;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,IAAAG,YAAI,EAAC,mBAAmB,EAAEC,CAAC,IAAI;EAC7B,MAAMC,OAAO,GAAG;IACdC,WAAW,EAAE;MACXC,EAAE,EAAE;IACN;EACF,CAAC;EAEDH,CAAC,CAACI,IAAI,CAAC,CAAC,CAAC;EACT,MAAMC,KAAK,GAAG;IACZC,QAAQ,EAAEC,MAAM,IAAI;MAClBP,CAAC,CAACQ,IAAI,CAAC,IAAAC,YAAA,CAAAX,OAAA,EAAWS,MAAM,CAAC,CAAC;MAC1B,OAAO,KAAK;IACd;EACF,CAAC;EAED,MAAMG,GAAG,GAAG,IAAAC,eAAM,EAACV,OAAO,EAAEI,KAAK,CAAC;EAClCL,CAAC,CAACY,EAAE,CAACF,GAAG,EAAE,KAAK,CAAC;AAClB,CAAC,CAAC","ignoreList":[]}
|
package/lib/test/store.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
-
|
|
5
4
|
var _redux = require("redux");
|
|
6
|
-
|
|
7
5
|
var _store = require("../store");
|
|
8
|
-
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
7
|
const appOptions = {
|
|
12
8
|
services: {
|
|
13
9
|
error: () => {
|
package/lib/test/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","names":["appOptions","services","error","Error","test","t","plan","store","createStore","state","pass","createMiddlewares","dispatch","type","getState","options","is","global","window","__REDUX_DEVTOOLS_EXTENSION__","f"],"sources":["../../src/test/store.js"],"sourcesContent":["import test from 'ava';\nimport {createStore} from 'redux';\nimport {createMiddlewares} from '../store';\n\nconst appOptions = {\n services: {\n error: () => {\n throw new Error('error logger should not have been called');\n }\n }\n};\n\ntest('should apply redux-thunk', async t => {\n t.plan(5);\n\n const store = createStore(\n state => {\n t.pass();\n return state;\n },\n 'state',\n createMiddlewares(appOptions)\n );\n\n await store.dispatch({type: 1});\n return store.dispatch((dispatch, getState, options) => {\n t.is(options, appOptions);\n t.is(getState(), 'state');\n return dispatch({\n type: 2\n });\n });\n});\n\ntest('should enable devtools', t => {\n t.plan(1);\n global.window = {\n __REDUX_DEVTOOLS_EXTENSION__: () => {\n t.pass();\n return f => f;\n }\n };\n\n createStore(state => state, 'state', createMiddlewares(appOptions));\n});\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"store.js","names":["_ava","_interopRequireDefault","require","_redux","_store","e","__esModule","default","appOptions","services","error","Error","test","t","plan","store","createStore","state","pass","createMiddlewares","dispatch","type","getState","options","is","global","window","__REDUX_DEVTOOLS_EXTENSION__","f"],"sources":["../../src/test/store.js"],"sourcesContent":["import test from 'ava';\nimport {createStore} from 'redux';\nimport {createMiddlewares} from '../store';\n\nconst appOptions = {\n services: {\n error: () => {\n throw new Error('error logger should not have been called');\n }\n }\n};\n\ntest('should apply redux-thunk', async t => {\n t.plan(5);\n\n const store = createStore(\n state => {\n t.pass();\n return state;\n },\n 'state',\n createMiddlewares(appOptions)\n );\n\n await store.dispatch({type: 1});\n return store.dispatch((dispatch, getState, options) => {\n t.is(options, appOptions);\n t.is(getState(), 'state');\n return dispatch({\n type: 2\n });\n });\n});\n\ntest('should enable devtools', t => {\n t.plan(1);\n global.window = {\n __REDUX_DEVTOOLS_EXTENSION__: () => {\n t.pass();\n return f => f;\n }\n };\n\n createStore(state => state, 'state', createMiddlewares(appOptions));\n});\n"],"mappings":";;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAA2C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3C,MAAMG,UAAU,GAAG;EACjBC,QAAQ,EAAE;IACRC,KAAK,EAAEA,CAAA,KAAM;MACX,MAAM,IAAIC,KAAK,CAAC,0CAA0C,CAAC;IAC7D;EACF;AACF,CAAC;AAED,IAAAC,YAAI,EAAC,0BAA0B,EAAE,MAAMC,CAAC,IAAI;EAC1CA,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC;EAET,MAAMC,KAAK,GAAG,IAAAC,kBAAW,EACvBC,KAAK,IAAI;IACPJ,CAAC,CAACK,IAAI,CAAC,CAAC;IACR,OAAOD,KAAK;EACd,CAAC,EACD,OAAO,EACP,IAAAE,wBAAiB,EAACX,UAAU,CAC9B,CAAC;EAED,MAAMO,KAAK,CAACK,QAAQ,CAAC;IAACC,IAAI,EAAE;EAAC,CAAC,CAAC;EAC/B,OAAON,KAAK,CAACK,QAAQ,CAAC,CAACA,QAAQ,EAAEE,QAAQ,EAAEC,OAAO,KAAK;IACrDV,CAAC,CAACW,EAAE,CAACD,OAAO,EAAEf,UAAU,CAAC;IACzBK,CAAC,CAACW,EAAE,CAACF,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;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