mumuki-laboratory 8.2.1 → 8.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -8
- data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +2 -1
- data/app/assets/javascripts/mumuki_laboratory/application/button.js +0 -2
- data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/i18n.js +73 -0
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +22 -1
- data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +6 -1
- data/app/assets/javascripts/mumuki_laboratory/application/primary.js +5 -3
- data/app/assets/javascripts/mumuki_laboratory/application/results-renderer.js +28 -1
- data/app/assets/javascripts/mumuki_laboratory/application/submission.js +72 -48
- data/app/assets/javascripts/mumuki_laboratory/application/upload.js +69 -14
- data/app/assets/stylesheets/mumuki_laboratory/application.scss +1 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/_codemirror-themes.scss +1 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/codemirror-themes/_mu-light.scss +3 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_content_show.scss +1 -1
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +31 -8
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +4 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids_results.scss +1 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_terms.scss +4 -0
- data/app/controllers/application_controller.rb +1 -1
- data/app/controllers/chapters_controller.rb +9 -5
- data/app/controllers/exam_authorization_requests_controller.rb +26 -0
- data/app/controllers/exam_registrations_controller.rb +6 -0
- data/app/controllers/guide_container_controller.rb +2 -7
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/contextualization_result_helper.rb +0 -8
- data/app/helpers/discussions_helper.rb +8 -0
- data/app/helpers/exercise_input_helper.rb +8 -17
- data/app/helpers/icons_helper.rb +3 -11
- data/app/helpers/menu_bar_helper.rb +6 -2
- data/app/helpers/overlapped_buttons_helper.rb +10 -6
- data/app/helpers/progress_bar_helper.rb +2 -2
- data/app/views/book_discussions/index.html.erb +3 -1
- data/app/views/chapters/show.html.erb +21 -9
- data/app/views/complements/show.html.erb +1 -1
- data/app/views/discussions/_message.html.erb +7 -7
- data/app/views/discussions/index.html.erb +11 -4
- data/app/views/exam_authorization_requests/show.html.erb +17 -0
- data/app/views/exam_registrations/show.html.erb +37 -0
- data/app/views/exams/show.html.erb +1 -1
- data/app/views/exercises/show.html.erb +2 -2
- data/app/views/layouts/_discussions.html.erb +0 -4
- data/app/views/layouts/_guide.html.erb +4 -33
- data/app/views/layouts/_guide_container.html.erb +28 -0
- data/app/views/layouts/_guide_title_icons.html.erb +9 -0
- data/app/views/layouts/_progress_bar.html.erb +9 -7
- data/app/views/layouts/_progress_listing.html.erb +5 -5
- data/app/views/layouts/_social_media.html.erb +2 -2
- data/app/views/layouts/application.html.erb +4 -7
- data/app/views/layouts/exercise_inputs/editors/_upload.html.erb +11 -2
- data/app/views/layouts/exercise_inputs/layouts/_input_kindergarten.html.erb +1 -1
- data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +1 -1
- data/app/views/lessons/show.html.erb +1 -1
- data/app/views/notifications/_discussion.html.erb +1 -0
- data/app/views/notifications/_dropdown.html.erb +13 -0
- data/app/views/notifications/_exam_authorization_request.html.erb +1 -0
- data/app/views/notifications/_exam_registration.html.erb +1 -0
- data/app/views/notifications/_message.html.erb +1 -0
- data/app/views/users/_term.html.erb +1 -1
- data/app/views/users/terms.html.erb +1 -1
- data/config/routes.rb +3 -0
- data/lib/mumuki/laboratory/controllers/notifications.rb +3 -22
- data/lib/mumuki/laboratory/controllers/results_rendering.rb +2 -1
- data/lib/mumuki/laboratory/locales/en.yml +34 -24
- data/lib/mumuki/laboratory/locales/es-CL.yml +25 -10
- data/lib/mumuki/laboratory/locales/es.yml +32 -23
- data/lib/mumuki/laboratory/locales/pt.yml +27 -17
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/controllers/exam_authorization_requests_controller_spec.rb +40 -0
- data/spec/controllers/exam_registrations_controller_spec.rb +19 -0
- data/spec/controllers/exercise_solutions_controller_spec.rb +3 -2
- data/spec/dummy/db/schema.rb +50 -1
- data/spec/dummy/public/character/animations.json +1 -0
- data/{public → spec/dummy/public}/character/kibi/context.svg +0 -0
- data/{public → spec/dummy/public}/character/kibi/failure.svg +0 -0
- data/{public → spec/dummy/public}/character/kibi/jump.svg +0 -0
- data/spec/dummy/public/character/kibi/passed_with_warnings.svg +4 -0
- data/{public → spec/dummy/public}/character/kibi/success2_l.svg +0 -0
- data/{public → spec/dummy/public}/character/kibi/success_l.svg +0 -0
- data/{public → spec/dummy/public}/character/magnifying_glass/apparition.svg +0 -0
- data/{public → spec/dummy/public}/character/magnifying_glass/loop.svg +0 -0
- data/spec/features/chapters_flow_spec.rb +112 -0
- data/spec/features/login_flow_spec.rb +1 -1
- data/spec/features/notifications_flow_spec.rb +46 -0
- data/spec/features/profile_flow_spec.rb +1 -2
- data/spec/features/terms_flow_spec.rb +30 -0
- data/spec/features/topic_flow_spec.rb +0 -1
- data/spec/javascripts/bridge-spec.js +2 -2
- data/spec/javascripts/csrf-token-spec.js +2 -2
- data/spec/javascripts/editors-spec.js +7 -9
- data/spec/javascripts/elipsis-spec.js +4 -4
- data/spec/javascripts/events-spec.js +7 -7
- data/spec/javascripts/exercise-spec.js +7 -8
- data/spec/javascripts/global-spec.js +3 -3
- data/spec/javascripts/i18n-spec.js +82 -0
- data/spec/javascripts/kids-button-spec.js +34 -0
- data/spec/javascripts/results-renderers-spec.js +5 -5
- data/spec/javascripts/speech-bubble-renderer-spec.js +2 -3
- data/spec/javascripts/submissions-store-spec.js +14 -14
- data/spec/javascripts/sync-mode-spec.js +3 -3
- data/spec/javascripts/timeout-spec.js +2 -2
- data/spec/javascripts/timer-spec.js +2 -2
- data/spec/javascripts/upload-spec.js +80 -0
- metadata +131 -96
- data/spec/features/chapter_spec.rb +0 -70
@@ -1,70 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
feature 'Chapters flow', organization_workspace: :test do
|
4
|
-
let(:haskell) { create(:haskell) }
|
5
|
-
|
6
|
-
let!(:chapter) {
|
7
|
-
create(:chapter, name: 'Functional Programming', lessons: [
|
8
|
-
create(:lesson, name: 'Values and Functions', language: haskell, description: 'Values are everywhere...', exercises: [
|
9
|
-
create(:exercise, name: 'The Basic Values', description: "Let's say we want to declare a variable...")
|
10
|
-
]),
|
11
|
-
create(:lesson, name: 'Monads and Functors', language: haskell, description: 'Monds are everywhere too...', exercises: [
|
12
|
-
create(:exercise, name: 'The Maybe Functor', description: "Let's say we want to model absense of value...")
|
13
|
-
])
|
14
|
-
]) }
|
15
|
-
|
16
|
-
before { reindex_current_organization! }
|
17
|
-
|
18
|
-
context 'no appendix' do
|
19
|
-
scenario 'show chapter, no appendix' do
|
20
|
-
visit "/chapters/#{chapter.id}"
|
21
|
-
|
22
|
-
expect(page).to have_text('Functional Programming')
|
23
|
-
expect(page).to have_text('The Basic Values')
|
24
|
-
|
25
|
-
expect(page).to have_text('Monads and Functors')
|
26
|
-
expect(page).to have_text('The Maybe Functor')
|
27
|
-
|
28
|
-
expect(page).to_not have_text('Appendix')
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
context 'with appendix' do
|
33
|
-
before { chapter.topic.update appendix: 'Check this article about endofunctors' }
|
34
|
-
|
35
|
-
scenario 'show chapter, with appendix' do
|
36
|
-
visit "/chapters/#{chapter.id}"
|
37
|
-
|
38
|
-
expect(page).to have_text('Functional Programming')
|
39
|
-
expect(page).to have_text('The Basic Values')
|
40
|
-
|
41
|
-
expect(page).to have_text('Monads and Functors')
|
42
|
-
expect(page).to have_text('The Maybe Functor')
|
43
|
-
|
44
|
-
expect(page).to have_text('Appendix')
|
45
|
-
end
|
46
|
-
|
47
|
-
scenario 'show appendix' do
|
48
|
-
visit "/chapters/#{chapter.id}/appendix"
|
49
|
-
expect(page).to have_text('Appendix')
|
50
|
-
expect(page).to have_text('endofunctors')
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
context 'incognito user' do
|
55
|
-
before { Organization.current.update! incognito_mode_enabled: true }
|
56
|
-
scenario 'show chapter, no appendix' do
|
57
|
-
visit "/chapters/#{chapter.id}"
|
58
|
-
|
59
|
-
expect(page).to have_text('Functional Programming')
|
60
|
-
expect(page).to have_text('The Basic Values')
|
61
|
-
|
62
|
-
expect(page).to have_text('Monads and Functors')
|
63
|
-
expect(page).to have_text('The Maybe Functor')
|
64
|
-
|
65
|
-
expect(page).to_not have_text('Appendix')
|
66
|
-
|
67
|
-
expect(page).to have_text('Sign in')
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|