@coorpacademy/app-review 0.2.8 → 0.2.9

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 (98) hide show
  1. package/es/actions/api/fetch-rank.d.ts +32 -0
  2. package/es/actions/api/fetch-rank.js +30 -0
  3. package/es/actions/api/test/fetch-correction.test.js +2 -1
  4. package/es/actions/api/test/fetch-rank.test.d.ts +1 -0
  5. package/es/actions/api/test/fetch-rank.test.js +100 -0
  6. package/es/actions/api/test/fetch-skills.test.js +2 -1
  7. package/es/actions/api/test/fetch-slide.test.js +2 -1
  8. package/es/actions/api/test/post-answer.test.js +2 -1
  9. package/es/actions/api/test/post-progression.test.js +2 -1
  10. package/es/actions/data/test/token.test.js +2 -1
  11. package/es/actions/ui/test/answers.test.js +2 -1
  12. package/es/actions/ui/test/slides.test.js +2 -1
  13. package/es/reducers/data/corrections.d.ts +1 -1
  14. package/es/reducers/data/index.d.ts +4 -1
  15. package/es/reducers/data/index.js +2 -1
  16. package/es/reducers/data/rank.d.ts +7 -0
  17. package/es/reducers/data/rank.js +36 -0
  18. package/es/reducers/data/test/rank.test.d.ts +1 -0
  19. package/es/reducers/data/test/rank.test.js +59 -0
  20. package/es/reducers/index.d.ts +4 -3
  21. package/es/reducers/ui/slide.d.ts +1 -0
  22. package/es/reducers/ui/slide.js +1 -1
  23. package/es/test/util/services.mock.d.ts +1 -0
  24. package/es/test/util/services.mock.js +16 -0
  25. package/es/views/skills/test/skills.test.js +4 -2
  26. package/es/views/slides/index.d.ts +21 -19
  27. package/es/views/slides/index.js +29 -3
  28. package/es/views/slides/test/fixtures/qcm-graphic.js +190 -28
  29. package/es/views/slides/test/index.test.js +200 -19
  30. package/es/views/slides/test/slide.free-text.on-change.test.js +4 -1
  31. package/es/views/slides/test/slide.qcm-drag.on-click.test.js +4 -1
  32. package/es/views/slides/test/slide.qcm-graphic.on-click.test.js +6 -3
  33. package/es/views/slides/test/slide.qcm.on-click.test.js +4 -1
  34. package/es/views/slides/test/slide.slider.on-change.test.js +4 -1
  35. package/es/views/slides/test/slide.template.on-change.test.js +6 -1
  36. package/lib/actions/api/fetch-rank.d.ts +32 -0
  37. package/lib/actions/api/fetch-rank.js +32 -0
  38. package/lib/actions/api/test/fetch-correction.test.js +2 -1
  39. package/lib/actions/api/test/fetch-rank.test.d.ts +1 -0
  40. package/lib/actions/api/test/fetch-rank.test.js +171 -0
  41. package/lib/actions/api/test/fetch-skills.test.js +2 -1
  42. package/lib/actions/api/test/fetch-slide.test.js +2 -1
  43. package/lib/actions/api/test/post-answer.test.js +2 -1
  44. package/lib/actions/api/test/post-progression.test.js +2 -1
  45. package/lib/actions/data/test/token.test.js +2 -1
  46. package/lib/actions/ui/test/answers.test.js +2 -1
  47. package/lib/actions/ui/test/slides.test.js +2 -1
  48. package/lib/reducers/data/corrections.d.ts +1 -1
  49. package/lib/reducers/data/index.d.ts +4 -1
  50. package/lib/reducers/data/index.js +2 -1
  51. package/lib/reducers/data/rank.d.ts +7 -0
  52. package/lib/reducers/data/rank.js +37 -0
  53. package/lib/reducers/data/test/rank.test.d.ts +1 -0
  54. package/lib/reducers/data/test/rank.test.js +59 -0
  55. package/lib/reducers/index.d.ts +4 -3
  56. package/lib/reducers/ui/slide.d.ts +1 -0
  57. package/lib/reducers/ui/slide.js +1 -1
  58. package/lib/test/util/services.mock.d.ts +1 -0
  59. package/lib/test/util/services.mock.js +7 -0
  60. package/lib/views/skills/test/skills.test.js +4 -2
  61. package/lib/views/slides/index.d.ts +21 -19
  62. package/lib/views/slides/index.js +29 -3
  63. package/lib/views/slides/test/fixtures/qcm-graphic.js +190 -28
  64. package/lib/views/slides/test/index.test.js +211 -22
  65. package/lib/views/slides/test/slide.free-text.on-change.test.js +4 -1
  66. package/lib/views/slides/test/slide.qcm-drag.on-click.test.js +4 -1
  67. package/lib/views/slides/test/slide.qcm-graphic.on-click.test.js +6 -3
  68. package/lib/views/slides/test/slide.qcm.on-click.test.js +4 -1
  69. package/lib/views/slides/test/slide.slider.on-change.test.js +4 -1
  70. package/lib/views/slides/test/slide.template.on-change.test.js +6 -1
  71. package/package.json +3 -3
  72. package/src/actions/api/fetch-rank.ts +84 -0
  73. package/src/actions/api/test/fetch-correction.test.ts +2 -1
  74. package/src/actions/api/test/fetch-rank.test.ts +130 -0
  75. package/src/actions/api/test/fetch-skills.test.ts +2 -1
  76. package/src/actions/api/test/fetch-slide.test.ts +2 -1
  77. package/src/actions/api/test/post-answer.test.ts +2 -1
  78. package/src/actions/api/test/post-progression.test.ts +2 -1
  79. package/src/actions/data/test/token.test.ts +2 -1
  80. package/src/actions/ui/test/answers.test.ts +2 -1
  81. package/src/actions/ui/test/slides.test.ts +2 -1
  82. package/src/reducers/data/corrections.ts +1 -1
  83. package/src/reducers/data/index.ts +3 -1
  84. package/src/reducers/data/rank.ts +60 -0
  85. package/src/reducers/data/test/rank.test.ts +78 -0
  86. package/src/reducers/index.ts +2 -2
  87. package/src/reducers/ui/slide.ts +2 -1
  88. package/src/test/util/services.mock.ts +17 -0
  89. package/src/views/skills/test/skills.test.ts +4 -2
  90. package/src/views/slides/index.ts +65 -22
  91. package/src/views/slides/test/fixtures/qcm-graphic.ts +196 -29
  92. package/src/views/slides/test/index.test.ts +210 -21
  93. package/src/views/slides/test/slide.free-text.on-change.test.ts +4 -1
  94. package/src/views/slides/test/slide.qcm-drag.on-click.test.ts +4 -1
  95. package/src/views/slides/test/slide.qcm-graphic.on-click.test.ts +6 -4
  96. package/src/views/slides/test/slide.qcm.on-click.test.ts +4 -1
  97. package/src/views/slides/test/slide.slider.on-change.test.ts +4 -1
  98. package/src/views/slides/test/slide.template.on-change.test.ts +6 -1
@@ -40,7 +40,8 @@ const initialState: StoreState = {
40
40
  },
41
41
  skills: [],
42
42
  token: '1234',
43
- corrections: {}
43
+ corrections: {},
44
+ rank: {}
44
45
  },
45
46
  ui: {
46
47
  currentSlideRef: qcmDragSlide._id,
@@ -65,6 +66,8 @@ test('should dispatch EDIT_QCM_DRAG action via the property onClick of a QCM Dra
65
66
 
66
67
  const props = mapStateToSlidesProps(getState(), dispatch);
67
68
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
69
+ animateCorrectionPopin: false,
70
+ showCorrectionPopin: false,
68
71
  hidden: false,
69
72
  position: 0,
70
73
  loading: false,
@@ -40,7 +40,8 @@ const initialState: StoreState = {
40
40
  },
41
41
  skills: [],
42
42
  token: '1234',
43
- corrections: {}
43
+ corrections: {},
44
+ rank: {}
44
45
  },
45
46
  ui: {
46
47
  currentSlideRef: qcmGraphicSlide._id,
@@ -58,19 +59,20 @@ test('should dispatch EDIT_QCM_GRAPHIC action via the property onClick of a QCM
58
59
  const expectedActions = [
59
60
  {
60
61
  type: EDIT_QCM_GRAPHIC,
61
- payload: ['Faux']
62
+ payload: ['Le retour d’information']
62
63
  }
63
64
  ];
64
65
  const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
65
66
 
66
67
  const props = mapStateToSlidesProps(getState(), dispatch);
67
68
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
69
+ animateCorrectionPopin: false,
70
+ showCorrectionPopin: false,
68
71
  hidden: false,
69
72
  position: 0,
70
73
  loading: false,
71
74
  parentContentTitle: 'From "Developing the review app" course',
72
- questionText:
73
- 'Pour mener une bonne négociation, il ne faut ressentir aucune émotion. Vrai ou faux ?'
75
+ questionText: 'Quels sont les 4 piliers de l’apprentissage ?'
74
76
  });
75
77
 
76
78
  const SlideProps = props.stack.slides['0'].answerUI?.model as QcmGraphic;
@@ -40,7 +40,8 @@ const initialState: StoreState = {
40
40
  },
41
41
  skills: [],
42
42
  token: '1234',
43
- corrections: {}
43
+ corrections: {},
44
+ rank: {}
44
45
  },
45
46
  ui: {
46
47
  currentSlideRef: qcmSlide._id,
@@ -67,6 +68,8 @@ test('should dispatch EDIT_QCM action via the property onClick of a QCM slide',
67
68
 
68
69
  const props = mapStateToSlidesProps(getState(), dispatch);
69
70
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
71
+ animateCorrectionPopin: false,
72
+ showCorrectionPopin: false,
70
73
  hidden: false,
71
74
  position: 0,
72
75
  loading: false,
@@ -40,7 +40,8 @@ const initialState: StoreState = {
40
40
  },
41
41
  skills: [],
42
42
  token: '1234',
43
- corrections: {}
43
+ corrections: {},
44
+ rank: {}
44
45
  },
45
46
  ui: {
46
47
  currentSlideRef: sliderSlide._id,
@@ -65,6 +66,8 @@ test('should dispatch EDIT_SLIDER action via the property onChange of a Slider s
65
66
 
66
67
  const props = mapStateToSlidesProps(getState(), dispatch);
67
68
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
69
+ animateCorrectionPopin: false,
70
+ showCorrectionPopin: false,
68
71
  hidden: false,
69
72
  position: 0,
70
73
  loading: false,
@@ -40,7 +40,8 @@ const initialState: StoreState = {
40
40
  },
41
41
  skills: [],
42
42
  token: '1234',
43
- corrections: {}
43
+ corrections: {},
44
+ rank: {}
44
45
  },
45
46
  ui: {
46
47
  currentSlideRef: templateSlide._id,
@@ -60,6 +61,8 @@ test('should dispatch EDIT_TEMPLATE action via the property onChange of a Templa
60
61
 
61
62
  const props = mapStateToSlidesProps(getState(), dispatch);
62
63
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
64
+ animateCorrectionPopin: false,
65
+ showCorrectionPopin: false,
63
66
  hidden: false,
64
67
  position: 0,
65
68
  loading: false,
@@ -80,6 +83,8 @@ test('should dispatch EDIT_TEMPLATE action via the property onChange of a Templa
80
83
 
81
84
  const props = mapStateToSlidesProps(getState(), dispatch);
82
85
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
86
+ animateCorrectionPopin: false,
87
+ showCorrectionPopin: false,
83
88
  hidden: false,
84
89
  position: 0,
85
90
  loading: false,