@coorpacademy/app-review 0.6.0 → 0.6.1-alpha.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/lib/actions/api/fetch-correction.js +25 -0
- package/lib/actions/api/fetch-rank.js +43 -0
- package/lib/actions/api/fetch-skills.js +23 -0
- package/lib/actions/api/fetch-slide.js +38 -0
- package/lib/actions/api/post-answer.js +43 -0
- package/lib/actions/api/post-progression.js +27 -0
- package/lib/actions/data/token.js +9 -0
- package/lib/actions/ui/answers.js +61 -0
- package/lib/actions/ui/navigation.js +31 -0
- package/lib/actions/ui/next-slide.js +28 -0
- package/lib/actions/ui/quit-popin.js +11 -0
- package/lib/actions/ui/slides.js +9 -0
- package/lib/common/index.js +17 -0
- package/lib/configure-store.js +27 -0
- package/lib/helpers/css-register.js +7 -0
- package/lib/index.js +101 -0
- package/lib/reducers/data/corrections.js +26 -0
- package/lib/reducers/data/index.js +13 -0
- package/lib/reducers/data/progression.js +18 -0
- package/lib/reducers/data/rank.js +32 -0
- package/lib/reducers/data/skills.js +13 -0
- package/lib/reducers/data/slides.js +25 -0
- package/lib/reducers/data/token.js +13 -0
- package/lib/reducers/index.js +12 -0
- package/lib/reducers/ui/answers.js +27 -0
- package/lib/reducers/ui/current-slide-ref.js +18 -0
- package/lib/reducers/ui/index.js +22 -0
- package/lib/reducers/ui/navigation.js +20 -0
- package/lib/reducers/ui/positions.js +32 -0
- package/lib/reducers/ui/quit-popin.js +18 -0
- package/lib/reducers/ui/show-congrats.js +22 -0
- package/lib/reducers/ui/slide.js +53 -0
- package/lib/services/fetch-correction.js +21 -0
- package/lib/services/fetch-rank.js +17 -0
- package/lib/services/fetch-skills.js +17 -0
- package/lib/services/fetch-slide.js +17 -0
- package/lib/services/fetch-slides-to-review-by-skill-ref.js +15 -0
- package/lib/services/index.js +20 -0
- package/lib/services/post-answer.js +27 -0
- package/lib/services/post-progression.js +28 -0
- package/lib/services/tools/fetch-responses.js +40 -0
- package/lib/services/tools/sleep.js +7 -0
- package/lib/types/common.js +2 -0
- package/lib/types/slides.js +2 -0
- package/lib/{src/views → views}/skills/index.js +8 -4
- package/lib/views/slides/index.js +325 -0
- package/lib/views/slides/map-api-slide-to-ui.js +177 -0
- package/package.json +5 -13
- package/es/sandbox/index.d.ts +0 -9
- package/es/sandbox/index.js +0 -41
- package/es/src/actions/test/create-test-store.d.ts +0 -5
- package/es/src/actions/test/create-test-store.js +0 -16
- package/es/src/test/index.test.d.ts +0 -1
- package/es/src/test/index.test.js +0 -66
- package/es/src/test/util/services.mock.d.ts +0 -7
- package/es/src/test/util/services.mock.js +0 -444
- package/es/src/views/slides/test/fixtures/free-text.d.ts +0 -4
- package/es/src/views/slides/test/fixtures/free-text.js +0 -38
- package/es/src/views/slides/test/fixtures/qcm-drag.d.ts +0 -4
- package/es/src/views/slides/test/fixtures/qcm-drag.js +0 -108
- package/es/src/views/slides/test/fixtures/qcm-graphic.d.ts +0 -4
- package/es/src/views/slides/test/fixtures/qcm-graphic.js +0 -252
- package/es/src/views/slides/test/fixtures/qcm.d.ts +0 -4
- package/es/src/views/slides/test/fixtures/qcm.js +0 -109
- package/es/src/views/slides/test/fixtures/slider.d.ts +0 -4
- package/es/src/views/slides/test/fixtures/slider.js +0 -37
- package/es/src/views/slides/test/fixtures/template.d.ts +0 -4
- package/es/src/views/slides/test/fixtures/template.js +0 -170
- package/lib/sandbox/index.d.ts +0 -9
- package/lib/sandbox/index.js +0 -43
- package/lib/src/actions/api/fetch-correction.js +0 -19
- package/lib/src/actions/api/fetch-rank.js +0 -38
- package/lib/src/actions/api/fetch-skills.js +0 -17
- package/lib/src/actions/api/fetch-slide.js +0 -81
- package/lib/src/actions/api/post-answer.js +0 -92
- package/lib/src/actions/api/post-progression.js +0 -72
- package/lib/src/actions/data/token.js +0 -5
- package/lib/src/actions/test/create-test-store.d.ts +0 -5
- package/lib/src/actions/test/create-test-store.js +0 -18
- package/lib/src/actions/ui/answers.js +0 -65
- package/lib/src/actions/ui/navigation.js +0 -86
- package/lib/src/actions/ui/next-slide.js +0 -21
- package/lib/src/actions/ui/quit-popin.js +0 -8
- package/lib/src/actions/ui/slides.js +0 -5
- package/lib/src/common/index.js +0 -10
- package/lib/src/configure-store.js +0 -21
- package/lib/src/helpers/css-register.js +0 -2
- package/lib/src/index.js +0 -86
- package/lib/src/reducers/data/corrections.js +0 -22
- package/lib/src/reducers/data/index.js +0 -8
- package/lib/src/reducers/data/progression.js +0 -17
- package/lib/src/reducers/data/rank.js +0 -28
- package/lib/src/reducers/data/skills.js +0 -12
- package/lib/src/reducers/data/slides.js +0 -20
- package/lib/src/reducers/data/token.js +0 -12
- package/lib/src/reducers/index.js +0 -7
- package/lib/src/reducers/ui/answers.js +0 -25
- package/lib/src/reducers/ui/current-slide-ref.js +0 -17
- package/lib/src/reducers/ui/index.js +0 -17
- package/lib/src/reducers/ui/navigation.js +0 -28
- package/lib/src/reducers/ui/positions.js +0 -28
- package/lib/src/reducers/ui/quit-popin.js +0 -17
- package/lib/src/reducers/ui/show-congrats.js +0 -21
- package/lib/src/reducers/ui/slide.js +0 -48
- package/lib/src/services/fetch-correction.js +0 -58
- package/lib/src/services/fetch-rank.js +0 -54
- package/lib/src/services/fetch-skills.js +0 -54
- package/lib/src/services/fetch-slide.js +0 -54
- package/lib/src/services/fetch-slides-to-review-by-skill-ref.js +0 -52
- package/lib/src/services/index.js +0 -16
- package/lib/src/services/post-answer.js +0 -64
- package/lib/src/services/post-progression.js +0 -65
- package/lib/src/services/tools/fetch-responses.js +0 -112
- package/lib/src/services/tools/sleep.js +0 -5
- package/lib/src/test/index.test.d.ts +0 -1
- package/lib/src/test/index.test.js +0 -170
- package/lib/src/test/util/services.mock.d.ts +0 -7
- package/lib/src/test/util/services.mock.js +0 -448
- package/lib/src/types/common.js +0 -1
- package/lib/src/types/slides.js +0 -1
- package/lib/src/views/slides/index.js +0 -315
- package/lib/src/views/slides/map-api-slide-to-ui.js +0 -188
- package/lib/src/views/slides/test/fixtures/free-text.d.ts +0 -4
- package/lib/src/views/slides/test/fixtures/free-text.js +0 -38
- package/lib/src/views/slides/test/fixtures/qcm-drag.d.ts +0 -4
- package/lib/src/views/slides/test/fixtures/qcm-drag.js +0 -108
- package/lib/src/views/slides/test/fixtures/qcm-graphic.d.ts +0 -4
- package/lib/src/views/slides/test/fixtures/qcm-graphic.js +0 -252
- package/lib/src/views/slides/test/fixtures/qcm.d.ts +0 -4
- package/lib/src/views/slides/test/fixtures/qcm.js +0 -109
- package/lib/src/views/slides/test/fixtures/slider.d.ts +0 -4
- package/lib/src/views/slides/test/fixtures/slider.js +0 -37
- package/lib/src/views/slides/test/fixtures/template.d.ts +0 -4
- package/lib/src/views/slides/test/fixtures/template.js +0 -170
- package/src/actions/api/fetch-correction.ts +0 -39
- package/src/actions/api/fetch-rank.ts +0 -91
- package/src/actions/api/fetch-skills.ts +0 -31
- package/src/actions/api/fetch-slide.ts +0 -54
- package/src/actions/api/post-answer.ts +0 -55
- package/src/actions/api/post-progression.ts +0 -37
- package/src/actions/api/test/fetch-correction.test.ts +0 -119
- package/src/actions/api/test/fetch-rank.test.ts +0 -138
- package/src/actions/api/test/fetch-skills.test.ts +0 -78
- package/src/actions/api/test/fetch-slide.test.ts +0 -85
- package/src/actions/api/test/post-answer.test.ts +0 -266
- package/src/actions/api/test/post-progression.test.ts +0 -127
- package/src/actions/data/test/token.test.ts +0 -32
- package/src/actions/data/token.ts +0 -11
- package/src/actions/test/create-test-store.ts +0 -25
- package/src/actions/ui/answers.ts +0 -77
- package/src/actions/ui/navigation.ts +0 -62
- package/src/actions/ui/next-slide.ts +0 -44
- package/src/actions/ui/quit-popin.ts +0 -10
- package/src/actions/ui/slides.ts +0 -26
- package/src/actions/ui/test/answers.test.ts +0 -174
- package/src/actions/ui/test/navigation.test.ts +0 -95
- package/src/actions/ui/test/next-slide.test.ts +0 -87
- package/src/actions/ui/test/quit-popin.test.ts +0 -39
- package/src/actions/ui/test/slides.test.ts +0 -33
- package/src/common/index.ts +0 -15
- package/src/common/test/get-progression-slide-ref.test.ts +0 -35
- package/src/configure-store.ts +0 -28
- package/src/helpers/css-modules-require-hook.d.ts +0 -4
- package/src/helpers/css-register.ts +0 -3
- package/src/index.tsx +0 -107
- package/src/reducers/data/corrections.ts +0 -36
- package/src/reducers/data/index.ts +0 -19
- package/src/reducers/data/progression.ts +0 -23
- package/src/reducers/data/rank.ts +0 -44
- package/src/reducers/data/skills.ts +0 -16
- package/src/reducers/data/slides.ts +0 -31
- package/src/reducers/data/test/corrections.test.ts +0 -36
- package/src/reducers/data/test/progression.test.ts +0 -28
- package/src/reducers/data/test/rank.test.ts +0 -59
- package/src/reducers/data/test/skills.test.ts +0 -14
- package/src/reducers/data/test/slides.test.ts +0 -27
- package/src/reducers/data/test/token.test.ts +0 -13
- package/src/reducers/data/token.ts +0 -15
- package/src/reducers/index.ts +0 -14
- package/src/reducers/ui/answers.ts +0 -41
- package/src/reducers/ui/current-slide-ref.ts +0 -22
- package/src/reducers/ui/index.ts +0 -29
- package/src/reducers/ui/navigation.ts +0 -29
- package/src/reducers/ui/positions.ts +0 -34
- package/src/reducers/ui/quit-popin.ts +0 -22
- package/src/reducers/ui/show-congrats.ts +0 -26
- package/src/reducers/ui/slide.ts +0 -87
- package/src/reducers/ui/test/answers.test.ts +0 -105
- package/src/reducers/ui/test/current-slide-ref.test.ts +0 -14
- package/src/reducers/ui/test/navigation.test.ts +0 -19
- package/src/reducers/ui/test/positions.test.ts +0 -82
- package/src/reducers/ui/test/quit-popin.test.ts +0 -24
- package/src/reducers/ui/test/show-congrats.test.ts +0 -40
- package/src/reducers/ui/test/slide.test.ts +0 -110
- package/src/services/fetch-correction.ts +0 -26
- package/src/services/fetch-rank.ts +0 -14
- package/src/services/fetch-skills.ts +0 -14
- package/src/services/fetch-slide.ts +0 -14
- package/src/services/fetch-slides-to-review-by-skill-ref.ts +0 -18
- package/src/services/index.ts +0 -18
- package/src/services/post-answer.ts +0 -28
- package/src/services/post-progression.ts +0 -28
- package/src/services/test/fetch-correction.test.ts +0 -55
- package/src/services/test/fetch-rank.test.ts +0 -34
- package/src/services/test/fetch-skills.test.ts +0 -39
- package/src/services/test/fetch-slide.test.ts +0 -30
- package/src/services/test/fetch-slides-to-review-by-skill-ref.test.ts +0 -51
- package/src/services/test/post-answer.test.ts +0 -100
- package/src/services/test/post-progression.test.ts +0 -66
- package/src/services/tools/fetch-responses.ts +0 -40
- package/src/services/tools/sleep.ts +0 -4
- package/src/test/index.test.tsx +0 -99
- package/src/test/util/services.mock.ts +0 -465
- package/src/types/common.ts +0 -207
- package/src/types/globals.d.ts +0 -4
- package/src/types/slides.ts +0 -98
- package/src/views/skills/index.ts +0 -48
- package/src/views/skills/test/skills.test.ts +0 -104
- package/src/views/slides/index.ts +0 -398
- package/src/views/slides/map-api-slide-to-ui.ts +0 -287
- package/src/views/slides/test/fixtures/free-text.ts +0 -44
- package/src/views/slides/test/fixtures/qcm-drag.ts +0 -112
- package/src/views/slides/test/fixtures/qcm-graphic.ts +0 -264
- package/src/views/slides/test/fixtures/qcm.ts +0 -120
- package/src/views/slides/test/fixtures/slider.ts +0 -43
- package/src/views/slides/test/fixtures/template.ts +0 -177
- package/src/views/slides/test/header.on-click.test.ts +0 -46
- package/src/views/slides/test/index.test.ts +0 -1515
- package/src/views/slides/test/map-api-slide-to-ui.test.ts +0 -52
- package/src/views/slides/test/on-quit-popin.on-click.test.ts +0 -66
- package/src/views/slides/test/slide.free-text.on-change.test.ts +0 -116
- package/src/views/slides/test/slide.next-slide.on-click.test.ts +0 -178
- package/src/views/slides/test/slide.qcm-drag.on-click.test.ts +0 -90
- package/src/views/slides/test/slide.qcm-graphic.on-click.test.ts +0 -90
- package/src/views/slides/test/slide.qcm.on-click.test.ts +0 -92
- package/src/views/slides/test/slide.slider.on-change.test.ts +0 -92
- package/src/views/slides/test/slide.slider.on-slider-change.test.ts +0 -91
- package/src/views/slides/test/slide.template.on-change.test.ts +0 -126
- /package/es/{src/actions → actions}/api/fetch-correction.d.ts +0 -0
- /package/es/{src/actions → actions}/api/fetch-correction.js +0 -0
- /package/es/{src/actions → actions}/api/fetch-rank.d.ts +0 -0
- /package/es/{src/actions → actions}/api/fetch-rank.js +0 -0
- /package/es/{src/actions → actions}/api/fetch-skills.d.ts +0 -0
- /package/es/{src/actions → actions}/api/fetch-skills.js +0 -0
- /package/es/{src/actions → actions}/api/fetch-slide.d.ts +0 -0
- /package/es/{src/actions → actions}/api/fetch-slide.js +0 -0
- /package/es/{src/actions → actions}/api/post-answer.d.ts +0 -0
- /package/es/{src/actions → actions}/api/post-answer.js +0 -0
- /package/es/{src/actions → actions}/api/post-progression.d.ts +0 -0
- /package/es/{src/actions → actions}/api/post-progression.js +0 -0
- /package/es/{src/actions → actions}/data/token.d.ts +0 -0
- /package/es/{src/actions → actions}/data/token.js +0 -0
- /package/es/{src/actions → actions}/ui/answers.d.ts +0 -0
- /package/es/{src/actions → actions}/ui/answers.js +0 -0
- /package/es/{src/actions → actions}/ui/navigation.d.ts +0 -0
- /package/es/{src/actions → actions}/ui/navigation.js +0 -0
- /package/es/{src/actions → actions}/ui/next-slide.d.ts +0 -0
- /package/es/{src/actions → actions}/ui/next-slide.js +0 -0
- /package/es/{src/actions → actions}/ui/quit-popin.d.ts +0 -0
- /package/es/{src/actions → actions}/ui/quit-popin.js +0 -0
- /package/es/{src/actions → actions}/ui/slides.d.ts +0 -0
- /package/es/{src/actions → actions}/ui/slides.js +0 -0
- /package/es/{src/common → common}/index.d.ts +0 -0
- /package/es/{src/common → common}/index.js +0 -0
- /package/es/{src/configure-store.d.ts → configure-store.d.ts} +0 -0
- /package/es/{src/configure-store.js → configure-store.js} +0 -0
- /package/es/{src/helpers → helpers}/css-register.d.ts +0 -0
- /package/es/{src/helpers → helpers}/css-register.js +0 -0
- /package/es/{src/index.d.ts → index.d.ts} +0 -0
- /package/es/{src/index.js → index.js} +0 -0
- /package/es/{src/reducers → reducers}/data/corrections.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/corrections.js +0 -0
- /package/es/{src/reducers → reducers}/data/index.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/index.js +0 -0
- /package/es/{src/reducers → reducers}/data/progression.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/progression.js +0 -0
- /package/es/{src/reducers → reducers}/data/rank.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/rank.js +0 -0
- /package/es/{src/reducers → reducers}/data/skills.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/skills.js +0 -0
- /package/es/{src/reducers → reducers}/data/slides.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/slides.js +0 -0
- /package/es/{src/reducers → reducers}/data/token.d.ts +0 -0
- /package/es/{src/reducers → reducers}/data/token.js +0 -0
- /package/es/{src/reducers → reducers}/index.d.ts +0 -0
- /package/es/{src/reducers → reducers}/index.js +0 -0
- /package/es/{src/reducers → reducers}/ui/answers.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/answers.js +0 -0
- /package/es/{src/reducers → reducers}/ui/current-slide-ref.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/current-slide-ref.js +0 -0
- /package/es/{src/reducers → reducers}/ui/index.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/index.js +0 -0
- /package/es/{src/reducers → reducers}/ui/navigation.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/navigation.js +0 -0
- /package/es/{src/reducers → reducers}/ui/positions.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/positions.js +0 -0
- /package/es/{src/reducers → reducers}/ui/quit-popin.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/quit-popin.js +0 -0
- /package/es/{src/reducers → reducers}/ui/show-congrats.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/show-congrats.js +0 -0
- /package/es/{src/reducers → reducers}/ui/slide.d.ts +0 -0
- /package/es/{src/reducers → reducers}/ui/slide.js +0 -0
- /package/es/{src/services → services}/fetch-correction.d.ts +0 -0
- /package/es/{src/services → services}/fetch-correction.js +0 -0
- /package/es/{src/services → services}/fetch-rank.d.ts +0 -0
- /package/es/{src/services → services}/fetch-rank.js +0 -0
- /package/es/{src/services → services}/fetch-skills.d.ts +0 -0
- /package/es/{src/services → services}/fetch-skills.js +0 -0
- /package/es/{src/services → services}/fetch-slide.d.ts +0 -0
- /package/es/{src/services → services}/fetch-slide.js +0 -0
- /package/es/{src/services → services}/fetch-slides-to-review-by-skill-ref.d.ts +0 -0
- /package/es/{src/services → services}/fetch-slides-to-review-by-skill-ref.js +0 -0
- /package/es/{src/services → services}/index.d.ts +0 -0
- /package/es/{src/services → services}/index.js +0 -0
- /package/es/{src/services → services}/post-answer.d.ts +0 -0
- /package/es/{src/services → services}/post-answer.js +0 -0
- /package/es/{src/services → services}/post-progression.d.ts +0 -0
- /package/es/{src/services → services}/post-progression.js +0 -0
- /package/es/{src/services → services}/tools/fetch-responses.d.ts +0 -0
- /package/es/{src/services → services}/tools/fetch-responses.js +0 -0
- /package/es/{src/services → services}/tools/sleep.d.ts +0 -0
- /package/es/{src/services → services}/tools/sleep.js +0 -0
- /package/es/{src/types → types}/common.d.ts +0 -0
- /package/es/{src/types → types}/common.js +0 -0
- /package/es/{src/types → types}/slides.d.ts +0 -0
- /package/es/{src/types → types}/slides.js +0 -0
- /package/es/{src/views → views}/skills/index.d.ts +0 -0
- /package/es/{src/views → views}/skills/index.js +0 -0
- /package/es/{src/views → views}/slides/index.d.ts +0 -0
- /package/es/{src/views → views}/slides/index.js +0 -0
- /package/es/{src/views → views}/slides/map-api-slide-to-ui.d.ts +0 -0
- /package/es/{src/views → views}/slides/map-api-slide-to-ui.js +0 -0
- /package/lib/{src/actions → actions}/api/fetch-correction.d.ts +0 -0
- /package/lib/{src/actions → actions}/api/fetch-rank.d.ts +0 -0
- /package/lib/{src/actions → actions}/api/fetch-skills.d.ts +0 -0
- /package/lib/{src/actions → actions}/api/fetch-slide.d.ts +0 -0
- /package/lib/{src/actions → actions}/api/post-answer.d.ts +0 -0
- /package/lib/{src/actions → actions}/api/post-progression.d.ts +0 -0
- /package/lib/{src/actions → actions}/data/token.d.ts +0 -0
- /package/lib/{src/actions → actions}/ui/answers.d.ts +0 -0
- /package/lib/{src/actions → actions}/ui/navigation.d.ts +0 -0
- /package/lib/{src/actions → actions}/ui/next-slide.d.ts +0 -0
- /package/lib/{src/actions → actions}/ui/quit-popin.d.ts +0 -0
- /package/lib/{src/actions → actions}/ui/slides.d.ts +0 -0
- /package/lib/{src/common → common}/index.d.ts +0 -0
- /package/lib/{src/configure-store.d.ts → configure-store.d.ts} +0 -0
- /package/lib/{src/helpers → helpers}/css-register.d.ts +0 -0
- /package/lib/{src/index.d.ts → index.d.ts} +0 -0
- /package/lib/{src/reducers → reducers}/data/corrections.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/data/index.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/data/progression.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/data/rank.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/data/skills.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/data/slides.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/data/token.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/index.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/answers.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/current-slide-ref.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/index.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/navigation.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/positions.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/quit-popin.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/show-congrats.d.ts +0 -0
- /package/lib/{src/reducers → reducers}/ui/slide.d.ts +0 -0
- /package/lib/{src/services → services}/fetch-correction.d.ts +0 -0
- /package/lib/{src/services → services}/fetch-rank.d.ts +0 -0
- /package/lib/{src/services → services}/fetch-skills.d.ts +0 -0
- /package/lib/{src/services → services}/fetch-slide.d.ts +0 -0
- /package/lib/{src/services → services}/fetch-slides-to-review-by-skill-ref.d.ts +0 -0
- /package/lib/{src/services → services}/index.d.ts +0 -0
- /package/lib/{src/services → services}/post-answer.d.ts +0 -0
- /package/lib/{src/services → services}/post-progression.d.ts +0 -0
- /package/lib/{src/services → services}/tools/fetch-responses.d.ts +0 -0
- /package/lib/{src/services → services}/tools/sleep.d.ts +0 -0
- /package/lib/{src/types → types}/common.d.ts +0 -0
- /package/lib/{src/types → types}/slides.d.ts +0 -0
- /package/lib/{src/views → views}/skills/index.d.ts +0 -0
- /package/lib/{src/views → views}/slides/index.d.ts +0 -0
- /package/lib/{src/views → views}/slides/map-api-slide-to-ui.d.ts +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import crossFetch from 'cross-fetch';
|
|
38
|
-
import decode from 'jwt-decode';
|
|
39
|
-
import { toJSON } from './tools/fetch-responses';
|
|
40
|
-
export var postAnswer = function (progression, token, answer) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var progressionId, slideRef, host, response;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
progressionId = progression._id;
|
|
46
|
-
slideRef = progression.state.nextContent.ref;
|
|
47
|
-
host = decode(token).host;
|
|
48
|
-
return [4 /*yield*/, crossFetch("".concat(host, "/api/v2/progressions/").concat(progressionId, "/answers"), {
|
|
49
|
-
method: 'post',
|
|
50
|
-
headers: { authorization: token, 'content-type': 'application/json' },
|
|
51
|
-
body: JSON.stringify({
|
|
52
|
-
content: {
|
|
53
|
-
ref: slideRef,
|
|
54
|
-
type: 'slide'
|
|
55
|
-
},
|
|
56
|
-
answer: answer
|
|
57
|
-
})
|
|
58
|
-
})];
|
|
59
|
-
case 1:
|
|
60
|
-
response = _a.sent();
|
|
61
|
-
return [2 /*return*/, toJSON(response)];
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}); };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import crossFetch from 'cross-fetch';
|
|
38
|
-
import decode from 'jwt-decode';
|
|
39
|
-
import { toJSON } from './tools/fetch-responses';
|
|
40
|
-
export var postProgression = function (skillRef, token) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var host, response;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
host = decode(token).host;
|
|
46
|
-
return [4 /*yield*/, crossFetch("".concat(host, "/api/v2/progressions"), {
|
|
47
|
-
method: 'post',
|
|
48
|
-
headers: { authorization: token, 'content-type': 'application/json' },
|
|
49
|
-
body: JSON.stringify({
|
|
50
|
-
content: {
|
|
51
|
-
ref: skillRef,
|
|
52
|
-
type: 'skill'
|
|
53
|
-
},
|
|
54
|
-
engine: {
|
|
55
|
-
ref: 'review',
|
|
56
|
-
version: '1'
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
})];
|
|
60
|
-
case 1:
|
|
61
|
-
response = _a.sent();
|
|
62
|
-
return [2 /*return*/, toJSON(response)];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}); };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
-
function step(op) {
|
|
30
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
32
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
-
switch (op[0]) {
|
|
35
|
-
case 0: case 1: t = op; break;
|
|
36
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
-
default:
|
|
40
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
-
if (t[2]) _.ops.pop();
|
|
45
|
-
_.trys.pop(); continue;
|
|
46
|
-
}
|
|
47
|
-
op = body.call(thisArg, _);
|
|
48
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var ResponseError = /** @class */ (function (_super) {
|
|
53
|
-
__extends(ResponseError, _super);
|
|
54
|
-
function ResponseError(statusCode, statusText, body) {
|
|
55
|
-
if (body === void 0) { body = ''; }
|
|
56
|
-
var _this = _super.call(this, "".concat(statusText, " ").concat(body).trim()) || this;
|
|
57
|
-
_this.name = 'ResponseError';
|
|
58
|
-
_this.statusCode = statusCode;
|
|
59
|
-
return _this;
|
|
60
|
-
}
|
|
61
|
-
return ResponseError;
|
|
62
|
-
}(Error));
|
|
63
|
-
export { ResponseError };
|
|
64
|
-
export var toJSON = function (response) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
-
var body, err_1;
|
|
66
|
-
return __generator(this, function (_a) {
|
|
67
|
-
switch (_a.label) {
|
|
68
|
-
case 0:
|
|
69
|
-
if (!!response.ok) return [3 /*break*/, 2];
|
|
70
|
-
return [4 /*yield*/, response.text()];
|
|
71
|
-
case 1:
|
|
72
|
-
body = _a.sent();
|
|
73
|
-
throw new ResponseError(response.status, response.statusText, body);
|
|
74
|
-
case 2:
|
|
75
|
-
_a.trys.push([2, 4, , 5]);
|
|
76
|
-
return [4 /*yield*/, response.json()];
|
|
77
|
-
case 3: return [2 /*return*/, _a.sent()];
|
|
78
|
-
case 4:
|
|
79
|
-
err_1 = _a.sent();
|
|
80
|
-
throw new ResponseError(response.status, response.statusText);
|
|
81
|
-
case 5: return [2 /*return*/];
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}); };
|
|
85
|
-
export var toText = function (response) { return __awaiter(void 0, void 0, void 0, function () {
|
|
86
|
-
var body;
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
switch (_a.label) {
|
|
89
|
-
case 0: return [4 /*yield*/, response.text()];
|
|
90
|
-
case 1:
|
|
91
|
-
body = _a.sent();
|
|
92
|
-
if (!response.ok) {
|
|
93
|
-
throw new ResponseError(response.status, response.statusText, body);
|
|
94
|
-
}
|
|
95
|
-
return [2 /*return*/, body];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}); };
|
|
99
|
-
export var toVoid = function (response) { return __awaiter(void 0, void 0, void 0, function () {
|
|
100
|
-
var body;
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0:
|
|
104
|
-
if (!!response.ok) return [3 /*break*/, 2];
|
|
105
|
-
return [4 /*yield*/, response.text()];
|
|
106
|
-
case 1:
|
|
107
|
-
body = _a.sent();
|
|
108
|
-
throw new ResponseError(response.status, response.statusText, body);
|
|
109
|
-
case 2: return [2 /*return*/];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}); };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import browserEnv from 'browser-env';
|
|
38
|
-
import identity from 'lodash/fp/identity';
|
|
39
|
-
import test from 'ava';
|
|
40
|
-
import React from 'react';
|
|
41
|
-
import { render, fireEvent, act } from '@testing-library/react';
|
|
42
|
-
import { sleep } from '../services/tools/sleep';
|
|
43
|
-
import AppReview from '..';
|
|
44
|
-
import { services } from './util/services.mock';
|
|
45
|
-
browserEnv({ pretendToBeVisual: true });
|
|
46
|
-
var elementExists = function (foundElements) {
|
|
47
|
-
return foundElements && foundElements[0];
|
|
48
|
-
};
|
|
49
|
-
var waitForChanges = function (msToWait) {
|
|
50
|
-
if (msToWait === void 0) { msToWait = 3000; }
|
|
51
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
switch (_a.label) {
|
|
54
|
-
case 0: return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
return __generator(this, function (_a) {
|
|
56
|
-
switch (_a.label) {
|
|
57
|
-
case 0: return [4 /*yield*/, sleep(msToWait)];
|
|
58
|
-
case 1:
|
|
59
|
-
_a.sent(); // wait *just* a little longer than the timeout in the component
|
|
60
|
-
return [2 /*return*/];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}); })];
|
|
64
|
-
case 1:
|
|
65
|
-
_a.sent();
|
|
66
|
-
return [2 /*return*/];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
var LIMIT = 5;
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
73
|
-
var clickAllSlides = function (t, container, accumulator) {
|
|
74
|
-
if (accumulator === void 0) { accumulator = 0; }
|
|
75
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
-
var validateButton, nextButton;
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0:
|
|
80
|
-
if (accumulator === LIMIT)
|
|
81
|
-
return [2 /*return*/];
|
|
82
|
-
if (!(accumulator === 4)) return [3 /*break*/, 2];
|
|
83
|
-
return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
switch (_a.label) {
|
|
86
|
-
case 0: return [4 /*yield*/, sleep(1000)];
|
|
87
|
-
case 1:
|
|
88
|
-
_a.sent();
|
|
89
|
-
return [2 /*return*/];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}); })];
|
|
93
|
-
case 1:
|
|
94
|
-
_a.sent();
|
|
95
|
-
_a.label = 2;
|
|
96
|
-
case 2:
|
|
97
|
-
validateButton = container.querySelectorAll("[data-name=\"slide-validate-button-".concat(accumulator, "\"]"));
|
|
98
|
-
t.truthy(elementExists(validateButton));
|
|
99
|
-
return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
100
|
-
return __generator(this, function (_a) {
|
|
101
|
-
switch (_a.label) {
|
|
102
|
-
case 0: return [4 /*yield*/, fireEvent.click(validateButton[0])];
|
|
103
|
-
case 1:
|
|
104
|
-
_a.sent();
|
|
105
|
-
return [2 /*return*/];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}); })];
|
|
109
|
-
case 3:
|
|
110
|
-
_a.sent();
|
|
111
|
-
nextButton = container.querySelectorAll("[data-name=\"next-question-button-".concat(accumulator, "\"]"));
|
|
112
|
-
t.truthy(elementExists(nextButton));
|
|
113
|
-
return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
114
|
-
return __generator(this, function (_a) {
|
|
115
|
-
switch (_a.label) {
|
|
116
|
-
case 0: return [4 /*yield*/, fireEvent.click(nextButton[0])];
|
|
117
|
-
case 1:
|
|
118
|
-
_a.sent();
|
|
119
|
-
return [2 /*return*/];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}); })];
|
|
123
|
-
case 4:
|
|
124
|
-
_a.sent();
|
|
125
|
-
return [4 /*yield*/, clickAllSlides(t, container, accumulator + 1)];
|
|
126
|
-
case 5:
|
|
127
|
-
_a.sent();
|
|
128
|
-
return [2 /*return*/];
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
var appOptions = {
|
|
134
|
-
token: process.env.API_TEST_TOKEN || '',
|
|
135
|
-
skillRef: 'skill_NJC0jFKoH',
|
|
136
|
-
services: services,
|
|
137
|
-
onQuitClick: identity,
|
|
138
|
-
url: process.env.LAMBDA_API_REVIEW_GET_SLIDES_URL || 'http://localhost:7006'
|
|
139
|
-
};
|
|
140
|
-
test('should show the loader while the app is fetching the data', function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
141
|
-
var container, loader;
|
|
142
|
-
return __generator(this, function (_a) {
|
|
143
|
-
switch (_a.label) {
|
|
144
|
-
case 0:
|
|
145
|
-
t.plan(2);
|
|
146
|
-
container = render(React.createElement(AppReview, { options: appOptions })).container;
|
|
147
|
-
return [4 /*yield*/, waitForChanges(1000)];
|
|
148
|
-
case 1:
|
|
149
|
-
_a.sent();
|
|
150
|
-
loader = container.querySelector('[data-name="loader"]');
|
|
151
|
-
t.truthy(loader);
|
|
152
|
-
// await waitFor(async () => {
|
|
153
|
-
// // await sleep(500);
|
|
154
|
-
// const result = await t.try(tt => {
|
|
155
|
-
// // rerender(<AppReview options={appOptions} />);
|
|
156
|
-
// const slidesContainer = container.querySelector('[data-name="slides-revision-container"]');
|
|
157
|
-
// tt.truthy(slidesContainer);
|
|
158
|
-
// });
|
|
159
|
-
// if (result.passed) return result.commit();
|
|
160
|
-
// result.discard();
|
|
161
|
-
// throw result.errors;
|
|
162
|
-
// });
|
|
163
|
-
// const stackedSlidesContainer = container.querySelector('[data-name="stacked-slides-container"]');
|
|
164
|
-
// t.truthy(stackedSlidesContainer);
|
|
165
|
-
// await clickAllSlides(t, container);
|
|
166
|
-
t.pass();
|
|
167
|
-
return [2 /*return*/];
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
}); });
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CorrectionFromAPI, ProgressionFromAPI, Services } from '../../types/common';
|
|
2
|
-
export declare const postProgressionResponse: ProgressionFromAPI;
|
|
3
|
-
export declare const postAnswerResponses: Record<string, ProgressionFromAPI>;
|
|
4
|
-
export declare const incorrectFreeTextPostAnswerResponse: ProgressionFromAPI;
|
|
5
|
-
export declare const progressionSlideWithPendingSlide: ProgressionFromAPI;
|
|
6
|
-
export declare const getChoicesCorrection: (ref: string, wrongChoice?: boolean) => CorrectionFromAPI;
|
|
7
|
-
export declare const services: Services;
|