@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.
- package/es/actions/api/fetch-rank.d.ts +32 -0
- package/es/actions/api/fetch-rank.js +30 -0
- package/es/actions/api/test/fetch-correction.test.js +2 -1
- package/es/actions/api/test/fetch-rank.test.d.ts +1 -0
- package/es/actions/api/test/fetch-rank.test.js +100 -0
- package/es/actions/api/test/fetch-skills.test.js +2 -1
- package/es/actions/api/test/fetch-slide.test.js +2 -1
- package/es/actions/api/test/post-answer.test.js +2 -1
- package/es/actions/api/test/post-progression.test.js +2 -1
- package/es/actions/data/test/token.test.js +2 -1
- package/es/actions/ui/test/answers.test.js +2 -1
- package/es/actions/ui/test/slides.test.js +2 -1
- package/es/reducers/data/corrections.d.ts +1 -1
- package/es/reducers/data/index.d.ts +4 -1
- package/es/reducers/data/index.js +2 -1
- package/es/reducers/data/rank.d.ts +7 -0
- package/es/reducers/data/rank.js +36 -0
- package/es/reducers/data/test/rank.test.d.ts +1 -0
- package/es/reducers/data/test/rank.test.js +59 -0
- package/es/reducers/index.d.ts +4 -3
- package/es/reducers/ui/slide.d.ts +1 -0
- package/es/reducers/ui/slide.js +1 -1
- package/es/test/util/services.mock.d.ts +1 -0
- package/es/test/util/services.mock.js +16 -0
- package/es/views/skills/test/skills.test.js +4 -2
- package/es/views/slides/index.d.ts +21 -19
- package/es/views/slides/index.js +29 -3
- package/es/views/slides/test/fixtures/qcm-graphic.js +190 -28
- package/es/views/slides/test/index.test.js +200 -19
- package/es/views/slides/test/slide.free-text.on-change.test.js +4 -1
- package/es/views/slides/test/slide.qcm-drag.on-click.test.js +4 -1
- package/es/views/slides/test/slide.qcm-graphic.on-click.test.js +6 -3
- package/es/views/slides/test/slide.qcm.on-click.test.js +4 -1
- package/es/views/slides/test/slide.slider.on-change.test.js +4 -1
- package/es/views/slides/test/slide.template.on-change.test.js +6 -1
- package/lib/actions/api/fetch-rank.d.ts +32 -0
- package/lib/actions/api/fetch-rank.js +32 -0
- package/lib/actions/api/test/fetch-correction.test.js +2 -1
- package/lib/actions/api/test/fetch-rank.test.d.ts +1 -0
- package/lib/actions/api/test/fetch-rank.test.js +171 -0
- package/lib/actions/api/test/fetch-skills.test.js +2 -1
- package/lib/actions/api/test/fetch-slide.test.js +2 -1
- package/lib/actions/api/test/post-answer.test.js +2 -1
- package/lib/actions/api/test/post-progression.test.js +2 -1
- package/lib/actions/data/test/token.test.js +2 -1
- package/lib/actions/ui/test/answers.test.js +2 -1
- package/lib/actions/ui/test/slides.test.js +2 -1
- package/lib/reducers/data/corrections.d.ts +1 -1
- package/lib/reducers/data/index.d.ts +4 -1
- package/lib/reducers/data/index.js +2 -1
- package/lib/reducers/data/rank.d.ts +7 -0
- package/lib/reducers/data/rank.js +37 -0
- package/lib/reducers/data/test/rank.test.d.ts +1 -0
- package/lib/reducers/data/test/rank.test.js +59 -0
- package/lib/reducers/index.d.ts +4 -3
- package/lib/reducers/ui/slide.d.ts +1 -0
- package/lib/reducers/ui/slide.js +1 -1
- package/lib/test/util/services.mock.d.ts +1 -0
- package/lib/test/util/services.mock.js +7 -0
- package/lib/views/skills/test/skills.test.js +4 -2
- package/lib/views/slides/index.d.ts +21 -19
- package/lib/views/slides/index.js +29 -3
- package/lib/views/slides/test/fixtures/qcm-graphic.js +190 -28
- package/lib/views/slides/test/index.test.js +211 -22
- package/lib/views/slides/test/slide.free-text.on-change.test.js +4 -1
- package/lib/views/slides/test/slide.qcm-drag.on-click.test.js +4 -1
- package/lib/views/slides/test/slide.qcm-graphic.on-click.test.js +6 -3
- package/lib/views/slides/test/slide.qcm.on-click.test.js +4 -1
- package/lib/views/slides/test/slide.slider.on-change.test.js +4 -1
- package/lib/views/slides/test/slide.template.on-change.test.js +6 -1
- package/package.json +3 -3
- package/src/actions/api/fetch-rank.ts +84 -0
- package/src/actions/api/test/fetch-correction.test.ts +2 -1
- package/src/actions/api/test/fetch-rank.test.ts +130 -0
- package/src/actions/api/test/fetch-skills.test.ts +2 -1
- package/src/actions/api/test/fetch-slide.test.ts +2 -1
- package/src/actions/api/test/post-answer.test.ts +2 -1
- package/src/actions/api/test/post-progression.test.ts +2 -1
- package/src/actions/data/test/token.test.ts +2 -1
- package/src/actions/ui/test/answers.test.ts +2 -1
- package/src/actions/ui/test/slides.test.ts +2 -1
- package/src/reducers/data/corrections.ts +1 -1
- package/src/reducers/data/index.ts +3 -1
- package/src/reducers/data/rank.ts +60 -0
- package/src/reducers/data/test/rank.test.ts +78 -0
- package/src/reducers/index.ts +2 -2
- package/src/reducers/ui/slide.ts +2 -1
- package/src/test/util/services.mock.ts +17 -0
- package/src/views/skills/test/skills.test.ts +4 -2
- package/src/views/slides/index.ts +65 -22
- package/src/views/slides/test/fixtures/qcm-graphic.ts +196 -29
- package/src/views/slides/test/index.test.ts +210 -21
- package/src/views/slides/test/slide.free-text.on-change.test.ts +4 -1
- package/src/views/slides/test/slide.qcm-drag.on-click.test.ts +4 -1
- package/src/views/slides/test/slide.qcm-graphic.on-click.test.ts +6 -4
- package/src/views/slides/test/slide.qcm.on-click.test.ts +4 -1
- package/src/views/slides/test/slide.slider.on-change.test.ts +4 -1
- 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: ['
|
|
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,
|