@coorpacademy/player-web 4.22.6 → 4.22.7

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 -391
  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 -339
  79. package/es/views/test/slide.js.map +0 -1
  80. package/lib/map-state-to-props/test/answer.js +0 -409
  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 -363
  157. package/lib/views/test/slide.js.map +0 -1
@@ -1,339 +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
- 'aria-label': '__Validate. __Submit your Answer',
126
- submitValue: '__Validate',
127
- disabled: true,
128
- name: 'validateAnswerCTA',
129
- light: false,
130
- small: false,
131
- secondary: false,
132
- useButtonTag: true
133
- });
134
- await t.notThrows(playerProps.cta.onClick);
135
- t.is(playerProps.help, 'Saisissez votre réponse.');
136
- t.truthy(playerProps.answerType);
137
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
138
- title: '__Question',
139
- type: 'question',
140
- selected: true
141
- }, {
142
- notify: true,
143
- disabled: false,
144
- title: '__Media',
145
- type: 'media',
146
- selected: false
147
- }, {
148
- title: '__Clue',
149
- type: 'clue',
150
- selected: false,
151
- disabled: false
152
- }, {
153
- disabled: true,
154
- title: '__Coach',
155
- type: 'coach'
156
- }]);
157
- t.is(playerProps.showNewMedia, true);
158
- t.is(playerProps.showReviewLesson, false);
159
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
160
- });
161
- test('should disable lesson button if slide has no lessons', async t => {
162
- const vNode = mapStateToVNode(stateSlideNoLessons);
163
- testRendering(vNode);
164
- const {
165
- props: {
166
- player: playerProps
167
- }
168
- } = vNode;
169
- t.is(playerProps.typeClue, 'answer');
170
- t.is(playerProps.text, null);
171
- t.deepEqual(playerProps.step, {
172
- current: 2,
173
- total: 4
174
- });
175
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
176
- t.deepEqual(_omit('onClick', playerProps.cta), {
177
- 'aria-label': '__Validate. __Submit your Answer',
178
- submitValue: '__Validate',
179
- disabled: true,
180
- name: 'validateAnswerCTA',
181
- light: false,
182
- small: false,
183
- secondary: false,
184
- useButtonTag: true
185
- });
186
- await t.notThrows(playerProps.cta.onClick);
187
- t.is(playerProps.help, 'Saisissez votre réponse.');
188
- t.truthy(playerProps.answerType);
189
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
190
- title: '__Question',
191
- type: 'question',
192
- selected: true
193
- }, {
194
- notify: false,
195
- disabled: true,
196
- title: '__Media',
197
- type: 'media',
198
- selected: false
199
- }, {
200
- title: '__Clue',
201
- type: 'clue',
202
- selected: false,
203
- disabled: false
204
- }, {
205
- disabled: true,
206
- title: '__Coach',
207
- type: 'coach'
208
- }]);
209
- t.is(playerProps.showNewMedia, false);
210
- t.is(playerProps.showReviewLesson, false);
211
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
212
- });
213
- test('should display loading clue', async t => {
214
- const vNode = mapStateToVNode(stateLoadingClue);
215
- testRendering(vNode);
216
- const {
217
- props: {
218
- player: playerProps
219
- }
220
- } = vNode;
221
- t.is(playerProps.typeClue, 'clue');
222
- t.is(playerProps.text, null);
223
- t.deepEqual(playerProps.step, {
224
- current: 1,
225
- total: 1
226
- });
227
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
228
- t.deepEqual(_omit('onClick', playerProps.cta), {
229
- submitValue: '__Back to question',
230
- name: 'backToQuestionCTA',
231
- light: false,
232
- small: false,
233
- secondary: true,
234
- disabled: false
235
- });
236
- await t.notThrows(playerProps.cta.onClick);
237
- t.is(playerProps.help, 'Saisissez votre réponse.');
238
- t.truthy(playerProps.answerType);
239
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
240
- title: '__Question',
241
- type: 'question',
242
- selected: false
243
- }, {
244
- notify: true,
245
- disabled: false,
246
- title: '__Media',
247
- type: 'media',
248
- selected: false
249
- }, {
250
- title: '__Clue',
251
- type: 'clue',
252
- selected: true,
253
- disabled: false
254
- }, {
255
- disabled: true,
256
- title: '__Coach',
257
- type: 'coach'
258
- }]);
259
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
260
- });
261
- test('should display clue', async t => {
262
- const vNode = mapStateToVNode(stateClue);
263
- testRendering(vNode);
264
- const {
265
- props: {
266
- player: playerProps
267
- }
268
- } = vNode;
269
- t.is(playerProps.typeClue, 'clue');
270
- t.is(playerProps.text, 'Clue');
271
- t.deepEqual(playerProps.step, {
272
- current: 2,
273
- total: 4
274
- });
275
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
276
- t.deepEqual(_omit('onClick', playerProps.cta), {
277
- submitValue: '__Back to question',
278
- name: 'backToQuestionCTA',
279
- light: false,
280
- small: false,
281
- secondary: true,
282
- disabled: false
283
- });
284
- await t.notThrows(playerProps.cta.onClick);
285
- t.is(playerProps.help, 'Saisissez votre réponse.');
286
- t.truthy(playerProps.answerType);
287
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
288
- title: '__Question',
289
- type: 'question',
290
- selected: false
291
- }, {
292
- notify: true,
293
- disabled: false,
294
- title: '__Media',
295
- type: 'media',
296
- selected: false
297
- }, {
298
- title: '__Clue',
299
- type: 'clue',
300
- selected: true,
301
- disabled: false
302
- }, {
303
- disabled: true,
304
- title: '__Coach',
305
- type: 'coach'
306
- }]);
307
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
308
- });
309
- test('should disable clue button if slide has no clue', t => {
310
- const vNode = mapStateToVNode(stateNoClue);
311
- testRendering(vNode);
312
- const {
313
- props: {
314
- player: playerProps
315
- }
316
- } = vNode;
317
- t.deepEqual(_map(_omit('onClick'), playerProps.buttons), [{
318
- title: '__Question',
319
- type: 'question',
320
- selected: true
321
- }, {
322
- notify: true,
323
- disabled: false,
324
- title: '__Media',
325
- type: 'media',
326
- selected: false
327
- }, {
328
- title: '__Clue',
329
- type: 'clue',
330
- selected: false,
331
- disabled: true
332
- }, {
333
- disabled: true,
334
- title: '__Coach',
335
- type: 'coach'
336
- }]);
337
- return Promise.all(_map(button => t.notThrows(button.onClick), playerProps.buttons));
338
- });
339
- //# 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","useButtonTag","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 'aria-label': '__Validate. __Submit your Answer',\n submitValue: '__Validate',\n disabled: true,\n name: 'validateAnswerCTA',\n light: false,\n small: false,\n secondary: false,\n useButtonTag: true\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 'aria-label': '__Validate. __Submit your Answer',\n submitValue: '__Validate',\n disabled: true,\n name: 'validateAnswerCTA',\n light: false,\n small: false,\n secondary: false,\n useButtonTag: true\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,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