@coorpacademy/player-web 4.2.10 → 4.2.11

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.
Files changed (157) hide show
  1. package/package.json +3 -4
  2. package/es/map-state-to-props/test/answer.js +0 -390
  3. package/es/map-state-to-props/test/answer.js.map +0 -1
  4. package/es/map-state-to-props/test/fixtures/player/clue.json +0 -131
  5. package/es/map-state-to-props/test/fixtures/player/loading-clue.json +0 -131
  6. package/es/map-state-to-props/test/fixtures/player/no-clue.json +0 -118
  7. package/es/map-state-to-props/test/fixtures/player/slide-no-lessons.json +0 -115
  8. package/es/map-state-to-props/test/fixtures/player/slide.json +0 -127
  9. package/es/map-state-to-props/test/fixtures/popin-correction/popin-extra-life.json +0 -139
  10. package/es/map-state-to-props/test/fixtures/popin-correction/popin-failure.json +0 -145
  11. package/es/map-state-to-props/test/fixtures/popin-correction/popin-next-level.json +0 -282
  12. package/es/map-state-to-props/test/fixtures/popin-correction/popin-revival.json +0 -140
  13. package/es/map-state-to-props/test/fixtures/popin-correction/popin-success-node.json +0 -154
  14. package/es/map-state-to-props/test/fixtures/popin-correction/popin-success.json +0 -268
  15. package/es/map-state-to-props/test/fixtures/popin-correction/state-fail-multiple-answers.json +0 -473
  16. package/es/map-state-to-props/test/fixtures/popin-end/fail.json +0 -205
  17. package/es/map-state-to-props/test/fixtures/popin-end/learner-adaptive-failure.json +0 -209
  18. package/es/map-state-to-props/test/fixtures/popin-end/learner-failure-with-redirection.json +0 -211
  19. package/es/map-state-to-props/test/fixtures/popin-end/learner-failure.json +0 -211
  20. package/es/map-state-to-props/test/fixtures/popin-end/learner-success-with-redirection.json +0 -278
  21. package/es/map-state-to-props/test/fixtures/popin-end/learner-success.json +0 -275
  22. package/es/map-state-to-props/test/fixtures/popin-end/success.json +0 -223
  23. package/es/map-state-to-props/test/fixtures/progression-learner.json +0 -102
  24. package/es/map-state-to-props/test/fixtures/progression-state.json +0 -45
  25. package/es/map-state-to-props/test/fixtures/slides/basic.json +0 -60
  26. package/es/map-state-to-props/test/fixtures/slides/plop.json +0 -56
  27. package/es/map-state-to-props/test/fixtures/slides/qcm-drag.json +0 -56
  28. package/es/map-state-to-props/test/fixtures/slides/qcm-graphic.json +0 -49
  29. package/es/map-state-to-props/test/fixtures/slides/qcm.json +0 -43
  30. package/es/map-state-to-props/test/fixtures/slides/slider.json +0 -57
  31. package/es/map-state-to-props/test/fixtures/slides/template.json +0 -49
  32. package/es/map-state-to-props/test/fixtures/slides/videos.json +0 -163
  33. package/es/map-state-to-props/test/fixtures/slides/with-context.json +0 -69
  34. package/es/map-state-to-props/test/header.js +0 -131
  35. package/es/map-state-to-props/test/header.js.map +0 -1
  36. package/es/map-state-to-props/test/index.js +0 -107
  37. package/es/map-state-to-props/test/index.js.map +0 -1
  38. package/es/map-state-to-props/test/player.js +0 -680
  39. package/es/map-state-to-props/test/player.js.map +0 -1
  40. package/es/map-state-to-props/test/popin-correction.create-header-cta.js +0 -301
  41. package/es/map-state-to-props/test/popin-correction.create-header-cta.js.map +0 -1
  42. package/es/map-state-to-props/test/popin-correction.js +0 -80
  43. package/es/map-state-to-props/test/popin-correction.js.map +0 -1
  44. package/es/map-state-to-props/test/popin-end.js +0 -313
  45. package/es/map-state-to-props/test/popin-end.js.map +0 -1
  46. package/es/map-state-to-props/test/popin-error.js +0 -77
  47. package/es/map-state-to-props/test/popin-error.js.map +0 -1
  48. package/es/map-state-to-props/test/resources.js +0 -31
  49. package/es/map-state-to-props/test/resources.js.map +0 -1
  50. package/es/test/add-timeout.js +0 -8
  51. package/es/test/add-timeout.js.map +0 -1
  52. package/es/test/helpers/css-register.js +0 -3
  53. package/es/test/helpers/css-register.js.map +0 -1
  54. package/es/test/helpers/macro.js +0 -6
  55. package/es/test/helpers/macro.js.map +0 -1
  56. package/es/test/index.js +0 -39
  57. package/es/test/index.js.map +0 -1
  58. package/es/test/init-reducers.js +0 -50
  59. package/es/test/init-reducers.js.map +0 -1
  60. package/es/test/locales.js +0 -8
  61. package/es/test/locales.js.map +0 -1
  62. package/es/test/run-app.js +0 -20
  63. package/es/test/run-app.js.map +0 -1
  64. package/es/test/store.js +0 -38
  65. package/es/test/store.js.map +0 -1
  66. package/es/views/test/helpers/render.js +0 -13
  67. package/es/views/test/helpers/render.js.map +0 -1
  68. package/es/views/test/helpers/state-to-vnode.js +0 -7
  69. package/es/views/test/helpers/state-to-vnode.js.map +0 -1
  70. package/es/views/test/loading.js +0 -15
  71. package/es/views/test/loading.js.map +0 -1
  72. package/es/views/test/popin-correction.js +0 -223
  73. package/es/views/test/popin-correction.js.map +0 -1
  74. package/es/views/test/popin-end.js +0 -93
  75. package/es/views/test/popin-end.js.map +0 -1
  76. package/es/views/test/router.js +0 -22
  77. package/es/views/test/router.js.map +0 -1
  78. package/es/views/test/slide.js +0 -335
  79. package/es/views/test/slide.js.map +0 -1
  80. package/lib/map-state-to-props/test/answer.js +0 -408
  81. package/lib/map-state-to-props/test/answer.js.map +0 -1
  82. package/lib/map-state-to-props/test/fixtures/player/clue.json +0 -131
  83. package/lib/map-state-to-props/test/fixtures/player/loading-clue.json +0 -131
  84. package/lib/map-state-to-props/test/fixtures/player/no-clue.json +0 -118
  85. package/lib/map-state-to-props/test/fixtures/player/slide-no-lessons.json +0 -115
  86. package/lib/map-state-to-props/test/fixtures/player/slide.json +0 -127
  87. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-extra-life.json +0 -139
  88. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-failure.json +0 -145
  89. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-next-level.json +0 -282
  90. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-revival.json +0 -140
  91. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-success-node.json +0 -154
  92. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-success.json +0 -268
  93. package/lib/map-state-to-props/test/fixtures/popin-correction/state-fail-multiple-answers.json +0 -473
  94. package/lib/map-state-to-props/test/fixtures/popin-end/fail.json +0 -205
  95. package/lib/map-state-to-props/test/fixtures/popin-end/learner-adaptive-failure.json +0 -209
  96. package/lib/map-state-to-props/test/fixtures/popin-end/learner-failure-with-redirection.json +0 -211
  97. package/lib/map-state-to-props/test/fixtures/popin-end/learner-failure.json +0 -211
  98. package/lib/map-state-to-props/test/fixtures/popin-end/learner-success-with-redirection.json +0 -278
  99. package/lib/map-state-to-props/test/fixtures/popin-end/learner-success.json +0 -275
  100. package/lib/map-state-to-props/test/fixtures/popin-end/success.json +0 -223
  101. package/lib/map-state-to-props/test/fixtures/progression-learner.json +0 -102
  102. package/lib/map-state-to-props/test/fixtures/progression-state.json +0 -45
  103. package/lib/map-state-to-props/test/fixtures/slides/basic.json +0 -60
  104. package/lib/map-state-to-props/test/fixtures/slides/plop.json +0 -56
  105. package/lib/map-state-to-props/test/fixtures/slides/qcm-drag.json +0 -56
  106. package/lib/map-state-to-props/test/fixtures/slides/qcm-graphic.json +0 -49
  107. package/lib/map-state-to-props/test/fixtures/slides/qcm.json +0 -43
  108. package/lib/map-state-to-props/test/fixtures/slides/slider.json +0 -57
  109. package/lib/map-state-to-props/test/fixtures/slides/template.json +0 -49
  110. package/lib/map-state-to-props/test/fixtures/slides/videos.json +0 -163
  111. package/lib/map-state-to-props/test/fixtures/slides/with-context.json +0 -69
  112. package/lib/map-state-to-props/test/header.js +0 -143
  113. package/lib/map-state-to-props/test/header.js.map +0 -1
  114. package/lib/map-state-to-props/test/index.js +0 -100
  115. package/lib/map-state-to-props/test/index.js.map +0 -1
  116. package/lib/map-state-to-props/test/player.js +0 -714
  117. package/lib/map-state-to-props/test/player.js.map +0 -1
  118. package/lib/map-state-to-props/test/popin-correction.create-header-cta.js +0 -315
  119. package/lib/map-state-to-props/test/popin-correction.create-header-cta.js.map +0 -1
  120. package/lib/map-state-to-props/test/popin-correction.js +0 -85
  121. package/lib/map-state-to-props/test/popin-correction.js.map +0 -1
  122. package/lib/map-state-to-props/test/popin-end.js +0 -328
  123. package/lib/map-state-to-props/test/popin-end.js.map +0 -1
  124. package/lib/map-state-to-props/test/popin-error.js +0 -85
  125. package/lib/map-state-to-props/test/popin-error.js.map +0 -1
  126. package/lib/map-state-to-props/test/resources.js +0 -42
  127. package/lib/map-state-to-props/test/resources.js.map +0 -1
  128. package/lib/test/add-timeout.js +0 -14
  129. package/lib/test/add-timeout.js.map +0 -1
  130. package/lib/test/helpers/css-register.js +0 -8
  131. package/lib/test/helpers/css-register.js.map +0 -1
  132. package/lib/test/helpers/macro.js +0 -12
  133. package/lib/test/helpers/macro.js.map +0 -1
  134. package/lib/test/index.js +0 -53
  135. package/lib/test/index.js.map +0 -1
  136. package/lib/test/init-reducers.js +0 -57
  137. package/lib/test/init-reducers.js.map +0 -1
  138. package/lib/test/locales.js +0 -18
  139. package/lib/test/locales.js.map +0 -1
  140. package/lib/test/run-app.js +0 -27
  141. package/lib/test/run-app.js.map +0 -1
  142. package/lib/test/store.js +0 -45
  143. package/lib/test/store.js.map +0 -1
  144. package/lib/views/test/helpers/render.js +0 -24
  145. package/lib/views/test/helpers/render.js.map +0 -1
  146. package/lib/views/test/helpers/state-to-vnode.js +0 -14
  147. package/lib/views/test/helpers/state-to-vnode.js.map +0 -1
  148. package/lib/views/test/loading.js +0 -22
  149. package/lib/views/test/loading.js.map +0 -1
  150. package/lib/views/test/popin-correction.js +0 -237
  151. package/lib/views/test/popin-correction.js.map +0 -1
  152. package/lib/views/test/popin-end.js +0 -105
  153. package/lib/views/test/popin-end.js.map +0 -1
  154. package/lib/views/test/router.js +0 -32
  155. package/lib/views/test/router.js.map +0 -1
  156. package/lib/views/test/slide.js +0 -359
  157. package/lib/views/test/slide.js.map +0 -1
@@ -1,335 +0,0 @@
1
- import _isFunction from "lodash/fp/isFunction";
2
- import _omit from "lodash/fp/omit";
3
- import _map from "lodash/fp/map";
4
- import _identity from "lodash/fp/identity";
5
- import test from 'ava';
6
- import { mockTranslate } from '@coorpacademy/translate';
7
- import { Analytics as AnalyticsService, Answers as AnswersService, Clues as CluesService, Coach as CoachService, Comments as CommentsService, Content as ContentService, ExitNodes as ExitNodesService, LeaderBoard as LeaderBoardService, Location as LocationService, Progressions as ProgressionsService, Recommendations as RecommendationsService } from '@coorpacademy/player-services';
8
- import microlearningHeader from '../../map-state-to-props/test/fixtures/progression-state';
9
- import learnerHeader from '../../map-state-to-props/test/fixtures/progression-learner';
10
- import stateSlide from '../../map-state-to-props/test/fixtures/player/slide';
11
- import stateSlideNoLessons from '../../map-state-to-props/test/fixtures/player/slide-no-lessons';
12
- import stateNoClue from '../../map-state-to-props/test/fixtures/player/no-clue';
13
- import stateClue from '../../map-state-to-props/test/fixtures/player/clue';
14
- import stateLoadingClue from '../../map-state-to-props/test/fixtures/player/loading-clue';
15
- import * as fixtures from '../../../sandbox/fixtures';
16
- import stateToVNode from './helpers/state-to-vnode';
17
- import testRendering from './helpers/render';
18
- const services = {
19
- Analytics: AnalyticsService,
20
- Answers: AnswersService(fixtures),
21
- Clues: CluesService(fixtures),
22
- Coach: CoachService,
23
- Comments: CommentsService,
24
- Content: ContentService(fixtures),
25
- ExitNodes: ExitNodesService(fixtures),
26
- LeaderBoard: LeaderBoardService,
27
- Location: LocationService,
28
- Logger: console,
29
- Progressions: ProgressionsService(fixtures),
30
- Recommendations: RecommendationsService(fixtures)
31
- };
32
- const options = {
33
- translate: mockTranslate,
34
- services
35
- };
36
- const store = {
37
- dispatch: _identity
38
- };
39
- const mapStateToVNode = stateToVNode(options, store);
40
- test('should display microlearning header', t => {
41
- const vNode = mapStateToVNode(microlearningHeader);
42
- testRendering(vNode);
43
- const {
44
- props: {
45
- player: {
46
- header: headerProps
47
- }
48
- }
49
- } = vNode;
50
- t.is(headerProps.type, 'microlearning');
51
- t.is(headerProps.content.title, 'Les réseaux sociaux au service du crowdfunding');
52
- t.is(headerProps.subcontent, null);
53
- t.deepEqual(headerProps.lives, {
54
- count: 3
55
- });
56
- const onClick = headerProps.content.onClick;
57
- t.true(_isFunction(onClick));
58
- const actionOnClick = onClick();
59
- t.true(_isFunction(actionOnClick));
60
- });
61
- test('should display learner header with chapter num', t => {
62
- const vNode = mapStateToVNode(learnerHeader);
63
- testRendering(vNode);
64
- const {
65
- props: {
66
- player: {
67
- header: headerProps
68
- }
69
- }
70
- } = vNode;
71
- t.is(headerProps.type, 'learner');
72
- t.is(headerProps.content.title, 'level1');
73
- t.is(headerProps.content.details, 'base-translation');
74
- t.is(headerProps.subcontent.title, 'chapter2!');
75
- t.is(headerProps.subcontent.details, '2/2');
76
- t.deepEqual(headerProps.lives, {
77
- count: 3
78
- });
79
- const onClick = headerProps.content.onClick;
80
- t.true(_isFunction(onClick));
81
- const actionOnClick = onClick();
82
- t.true(_isFunction(actionOnClick));
83
- });
84
- test('should display learner header with no chapter nums', t => {
85
- const state = _omit('data.contents.level.entities.1.chapterIds', learnerHeader);
86
-
87
- const vNode = mapStateToVNode(state);
88
- testRendering(vNode);
89
- const {
90
- props: {
91
- player: {
92
- header: headerProps
93
- }
94
- }
95
- } = vNode;
96
- t.is(headerProps.type, 'learner');
97
- t.is(headerProps.content.title, 'level1');
98
- t.is(headerProps.content.details, 'base-translation');
99
- t.is(headerProps.subcontent.title, 'chapter2!');
100
- t.is(headerProps.subcontent.details, null);
101
- t.deepEqual(headerProps.lives, {
102
- count: 3
103
- });
104
- const onClick = headerProps.content.onClick;
105
- t.true(_isFunction(onClick));
106
- const actionOnClick = onClick();
107
- t.true(_isFunction(actionOnClick));
108
- });
109
- test('should display slide', async t => {
110
- const vNode = mapStateToVNode(stateSlide);
111
- testRendering(vNode);
112
- const {
113
- props: {
114
- player: playerProps
115
- }
116
- } = vNode;
117
- t.is(playerProps.typeClue, 'answer');
118
- t.is(playerProps.text, null);
119
- t.deepEqual(playerProps.step, {
120
- current: 2,
121
- total: 4
122
- });
123
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
124
- t.deepEqual(_omit('onClick', playerProps.cta), {
125
- submitValue: '__Validate',
126
- disabled: true,
127
- name: 'validateAnswerCTA',
128
- light: false,
129
- small: false,
130
- secondary: false
131
- });
132
- await t.notThrows(playerProps.cta.onClick);
133
- t.is(playerProps.help, 'Saisissez votre réponse.');
134
- t.truthy(playerProps.answerType);
135
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
136
- title: '__Question',
137
- type: 'question',
138
- selected: true
139
- }, {
140
- notify: true,
141
- disabled: false,
142
- title: '__Media',
143
- type: 'media',
144
- selected: false
145
- }, {
146
- title: '__Clue',
147
- type: 'clue',
148
- selected: false,
149
- disabled: false
150
- }, {
151
- disabled: true,
152
- title: '__Coach',
153
- type: 'coach'
154
- }]);
155
- t.is(playerProps.showNewMedia, true);
156
- t.is(playerProps.showReviewLesson, false);
157
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
158
- });
159
- test('should disable lesson button if slide has no lessons', async t => {
160
- const vNode = mapStateToVNode(stateSlideNoLessons);
161
- testRendering(vNode);
162
- const {
163
- props: {
164
- player: playerProps
165
- }
166
- } = vNode;
167
- t.is(playerProps.typeClue, 'answer');
168
- t.is(playerProps.text, null);
169
- t.deepEqual(playerProps.step, {
170
- current: 2,
171
- total: 4
172
- });
173
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
174
- t.deepEqual(_omit('onClick', playerProps.cta), {
175
- submitValue: '__Validate',
176
- disabled: true,
177
- name: 'validateAnswerCTA',
178
- light: false,
179
- small: false,
180
- secondary: false
181
- });
182
- await t.notThrows(playerProps.cta.onClick);
183
- t.is(playerProps.help, 'Saisissez votre réponse.');
184
- t.truthy(playerProps.answerType);
185
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
186
- title: '__Question',
187
- type: 'question',
188
- selected: true
189
- }, {
190
- notify: false,
191
- disabled: true,
192
- title: '__Media',
193
- type: 'media',
194
- selected: false
195
- }, {
196
- title: '__Clue',
197
- type: 'clue',
198
- selected: false,
199
- disabled: false
200
- }, {
201
- disabled: true,
202
- title: '__Coach',
203
- type: 'coach'
204
- }]);
205
- t.is(playerProps.showNewMedia, false);
206
- t.is(playerProps.showReviewLesson, false);
207
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
208
- });
209
- test('should display loading clue', async t => {
210
- const vNode = mapStateToVNode(stateLoadingClue);
211
- testRendering(vNode);
212
- const {
213
- props: {
214
- player: playerProps
215
- }
216
- } = vNode;
217
- t.is(playerProps.typeClue, 'clue');
218
- t.is(playerProps.text, null);
219
- t.deepEqual(playerProps.step, {
220
- current: 1,
221
- total: 1
222
- });
223
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
224
- t.deepEqual(_omit('onClick', playerProps.cta), {
225
- submitValue: '__Back to question',
226
- name: 'backToQuestionCTA',
227
- light: false,
228
- small: false,
229
- secondary: true,
230
- disabled: false
231
- });
232
- await t.notThrows(playerProps.cta.onClick);
233
- t.is(playerProps.help, 'Saisissez votre réponse.');
234
- t.truthy(playerProps.answerType);
235
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
236
- title: '__Question',
237
- type: 'question',
238
- selected: false
239
- }, {
240
- notify: true,
241
- disabled: false,
242
- title: '__Media',
243
- type: 'media',
244
- selected: false
245
- }, {
246
- title: '__Clue',
247
- type: 'clue',
248
- selected: true,
249
- disabled: false
250
- }, {
251
- disabled: true,
252
- title: '__Coach',
253
- type: 'coach'
254
- }]);
255
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
256
- });
257
- test('should display clue', async t => {
258
- const vNode = mapStateToVNode(stateClue);
259
- testRendering(vNode);
260
- const {
261
- props: {
262
- player: playerProps
263
- }
264
- } = vNode;
265
- t.is(playerProps.typeClue, 'clue');
266
- t.is(playerProps.text, 'Clue');
267
- t.deepEqual(playerProps.step, {
268
- current: 2,
269
- total: 4
270
- });
271
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
272
- t.deepEqual(_omit('onClick', playerProps.cta), {
273
- submitValue: '__Back to question',
274
- name: 'backToQuestionCTA',
275
- light: false,
276
- small: false,
277
- secondary: true,
278
- disabled: false
279
- });
280
- await t.notThrows(playerProps.cta.onClick);
281
- t.is(playerProps.help, 'Saisissez votre réponse.');
282
- t.truthy(playerProps.answerType);
283
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
284
- title: '__Question',
285
- type: 'question',
286
- selected: false
287
- }, {
288
- notify: true,
289
- disabled: false,
290
- title: '__Media',
291
- type: 'media',
292
- selected: false
293
- }, {
294
- title: '__Clue',
295
- type: 'clue',
296
- selected: true,
297
- disabled: false
298
- }, {
299
- disabled: true,
300
- title: '__Coach',
301
- type: 'coach'
302
- }]);
303
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
304
- });
305
- test('should disable clue button if slide has no clue', t => {
306
- const vNode = mapStateToVNode(stateNoClue);
307
- testRendering(vNode);
308
- const {
309
- props: {
310
- player: playerProps
311
- }
312
- } = vNode;
313
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
314
- title: '__Question',
315
- type: 'question',
316
- selected: true
317
- }, {
318
- notify: true,
319
- disabled: false,
320
- title: '__Media',
321
- type: 'media',
322
- selected: false
323
- }, {
324
- title: '__Clue',
325
- type: 'clue',
326
- selected: false,
327
- disabled: true
328
- }, {
329
- disabled: true,
330
- title: '__Coach',
331
- type: 'coach'
332
- }]);
333
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
334
- });
335
- //# sourceMappingURL=slide.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slide.js","names":["test","mockTranslate","Analytics","AnalyticsService","Answers","AnswersService","Clues","CluesService","Coach","CoachService","Comments","CommentsService","Content","ContentService","ExitNodes","ExitNodesService","LeaderBoard","LeaderBoardService","Location","LocationService","Progressions","ProgressionsService","Recommendations","RecommendationsService","microlearningHeader","learnerHeader","stateSlide","stateSlideNoLessons","stateNoClue","stateClue","stateLoadingClue","fixtures","stateToVNode","testRendering","services","Logger","console","options","translate","store","dispatch","mapStateToVNode","t","vNode","props","player","header","headerProps","is","type","content","title","subcontent","deepEqual","lives","count","onClick","true","actionOnClick","details","state","playerProps","typeClue","text","step","current","total","question","cta","submitValue","disabled","name","light","small","secondary","notThrows","help","truthy","answerType","buttons","selected","notify","showNewMedia","showReviewLesson","Promise","all","button"],"sources":["../../../src/views/test/slide.js"],"sourcesContent":["import test from 'ava';\nimport {identity, map, omit, isFunction} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\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';\nimport microlearningHeader from '../../map-state-to-props/test/fixtures/progression-state';\nimport learnerHeader from '../../map-state-to-props/test/fixtures/progression-learner';\nimport stateSlide from '../../map-state-to-props/test/fixtures/player/slide';\nimport stateSlideNoLessons from '../../map-state-to-props/test/fixtures/player/slide-no-lessons';\nimport stateNoClue from '../../map-state-to-props/test/fixtures/player/no-clue';\nimport stateClue from '../../map-state-to-props/test/fixtures/player/clue';\nimport stateLoadingClue from '../../map-state-to-props/test/fixtures/player/loading-clue';\nimport * as fixtures from '../../../sandbox/fixtures';\nimport stateToVNode from './helpers/state-to-vnode';\nimport testRendering from './helpers/render';\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\nconst options = {translate: mockTranslate, services};\nconst store = {dispatch: identity};\nconst mapStateToVNode = stateToVNode(options, store);\n\ntest('should display microlearning header', t => {\n const vNode = mapStateToVNode(microlearningHeader);\n testRendering(vNode);\n const {\n props: {\n player: {header: headerProps}\n }\n } = vNode;\n t.is(headerProps.type, 'microlearning');\n t.is(headerProps.content.title, 'Les réseaux sociaux au service du crowdfunding');\n t.is(headerProps.subcontent, null);\n t.deepEqual(headerProps.lives, {count: 3});\n const onClick = headerProps.content.onClick;\n t.true(isFunction(onClick));\n const actionOnClick = onClick();\n t.true(isFunction(actionOnClick));\n});\n\ntest('should display learner header with chapter num', t => {\n const vNode = mapStateToVNode(learnerHeader);\n testRendering(vNode);\n const {\n props: {\n player: {header: headerProps}\n }\n } = vNode;\n\n t.is(headerProps.type, 'learner');\n t.is(headerProps.content.title, 'level1');\n t.is(headerProps.content.details, 'base-translation');\n t.is(headerProps.subcontent.title, 'chapter2!');\n t.is(headerProps.subcontent.details, '2/2');\n t.deepEqual(headerProps.lives, {count: 3});\n\n const onClick = headerProps.content.onClick;\n t.true(isFunction(onClick));\n const actionOnClick = onClick();\n t.true(isFunction(actionOnClick));\n});\n\ntest('should display learner header with no chapter nums', t => {\n const state = omit('data.contents.level.entities.1.chapterIds', learnerHeader);\n\n const vNode = mapStateToVNode(state);\n testRendering(vNode);\n const {\n props: {\n player: {header: headerProps}\n }\n } = vNode;\n\n t.is(headerProps.type, 'learner');\n t.is(headerProps.content.title, 'level1');\n t.is(headerProps.content.details, 'base-translation');\n t.is(headerProps.subcontent.title, 'chapter2!');\n t.is(headerProps.subcontent.details, null);\n t.deepEqual(headerProps.lives, {count: 3});\n\n const onClick = headerProps.content.onClick;\n t.true(isFunction(onClick));\n const actionOnClick = onClick();\n t.true(isFunction(actionOnClick));\n});\n\ntest('should display slide', async t => {\n const vNode = mapStateToVNode(stateSlide);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'answer');\n t.is(playerProps.text, null);\n\n t.deepEqual(playerProps.step, {current: 2, total: 4});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n submitValue: '__Validate',\n disabled: true,\n name: 'validateAnswerCTA',\n light: false,\n small: false,\n secondary: false\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: true\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: false,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n t.is(playerProps.showNewMedia, true);\n t.is(playerProps.showReviewLesson, false);\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should disable lesson button if slide has no lessons', async t => {\n const vNode = mapStateToVNode(stateSlideNoLessons);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'answer');\n t.is(playerProps.text, null);\n\n t.deepEqual(playerProps.step, {current: 2, total: 4});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n submitValue: '__Validate',\n disabled: true,\n name: 'validateAnswerCTA',\n light: false,\n small: false,\n secondary: false\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: true\n },\n {\n notify: false,\n disabled: true,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: false,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n t.is(playerProps.showNewMedia, false);\n t.is(playerProps.showReviewLesson, false);\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should display loading clue', async t => {\n const vNode = mapStateToVNode(stateLoadingClue);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'clue');\n t.is(playerProps.text, null);\n\n t.deepEqual(playerProps.step, {current: 1, total: 1});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n submitValue: '__Back to question',\n name: 'backToQuestionCTA',\n light: false,\n small: false,\n secondary: true,\n disabled: false\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: false\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: true,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should display clue', async t => {\n const vNode = mapStateToVNode(stateClue);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'clue');\n t.is(playerProps.text, 'Clue');\n\n t.deepEqual(playerProps.step, {current: 2, total: 4});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n submitValue: '__Back to question',\n name: 'backToQuestionCTA',\n light: false,\n small: false,\n secondary: true,\n disabled: false\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: false\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: true,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should disable clue button if slide has no clue', t => {\n const vNode = mapStateToVNode(stateNoClue);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: true\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: false,\n disabled: true\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n"],"mappings":";;;;AAAA,OAAOA,IAAP,MAAiB,KAAjB;AAGA,SAAQC,aAAR,QAA4B,yBAA5B;AACA,SACEC,SAAS,IAAIC,gBADf,EAEEC,OAAO,IAAIC,cAFb,EAGEC,KAAK,IAAIC,YAHX,EAIEC,KAAK,IAAIC,YAJX,EAKEC,QAAQ,IAAIC,eALd,EAMEC,OAAO,IAAIC,cANb,EAOEC,SAAS,IAAIC,gBAPf,EAQEC,WAAW,IAAIC,kBARjB,EASEC,QAAQ,IAAIC,eATd,EAUEC,YAAY,IAAIC,mBAVlB,EAWEC,eAAe,IAAIC,sBAXrB,QAYO,+BAZP;AAaA,OAAOC,mBAAP,MAAgC,0DAAhC;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AACA,OAAOC,UAAP,MAAuB,qDAAvB;AACA,OAAOC,mBAAP,MAAgC,gEAAhC;AACA,OAAOC,WAAP,MAAwB,uDAAxB;AACA,OAAOC,SAAP,MAAsB,oDAAtB;AACA,OAAOC,gBAAP,MAA6B,4DAA7B;AACA,OAAO,KAAKC,QAAZ,MAA0B,2BAA1B;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AAEA,MAAMC,QAAQ,GAAG;EACfhC,SAAS,EAAEC,gBADI;EAEfC,OAAO,EAAEC,cAAc,CAA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