mumuki-laboratory 9.20.1 → 9.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/appendixes_controller.rb +7 -0
- data/app/controllers/application_controller.rb +6 -1
- data/app/controllers/complements_controller.rb +13 -0
- data/app/helpers/application_helper.rb +3 -1
- data/app/helpers/discussions_helper.rb +2 -2
- data/app/views/book/show.html.erb +21 -18
- data/app/views/chapters/show.html.erb +1 -1
- data/app/views/discussions/_message.html.erb +1 -1
- data/app/views/errors/forbidden.html.erb +1 -3
- data/app/views/errors/gone.html.erb +1 -2
- data/app/views/errors/not_found.html.erb +1 -1
- data/app/views/guides/_guide.html.erb +9 -5
- data/lib/mumuki/laboratory/controllers/dynamic_errors.rb +6 -6
- data/lib/mumuki/laboratory/controllers/validate_access_mode.rb +5 -1
- data/lib/mumuki/laboratory/locales/es-CL.yml +1 -1
- data/lib/mumuki/laboratory/locales/es.yml +1 -1
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/features/guides_flow_spec.rb +29 -7
- data/spec/features/immersive_redirection_spec.rb +1 -1
- data/spec/features/not_found_public_flow_spec.rb +8 -1
- data/spec/features/profile_flow_spec.rb +1 -1
- data/spec/features/read_only_flow_spec.rb +72 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e520213e1d2d2cd643b0ee1d9506324394a18978ea319f8f0c7917a1bfba8c2b
|
4
|
+
data.tar.gz: a8e99258a755b5fbe2a2f3b4927b1102ebbcee837e995839bf1989324ff783af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51562ad86aab9f22e3c6ae6a651bdc22cdd84159eb9394122b12ff885f19ceac51b375544e852870a3c80ec689fd5bf98e9291c8797dddf444887269cb006ddc
|
7
|
+
data.tar.gz: eb8b795ebfdd92ccb48d571558c5cba3866fb09ce03217f8a5a22cd82799a5bec70bcf97e8aa71789ca21d2d484c0ae928db7aa3b9fb955bb573d57af896cbcc
|
@@ -44,7 +44,8 @@ class ApplicationController < ActionController::Base
|
|
44
44
|
:theme_stylesheet_url,
|
45
45
|
:extension_javascript_url,
|
46
46
|
:current_immersive_path,
|
47
|
-
:current_access_mode
|
47
|
+
:current_access_mode,
|
48
|
+
:limited_query?
|
48
49
|
|
49
50
|
add_flash_types :info
|
50
51
|
|
@@ -170,4 +171,8 @@ class ApplicationController < ActionController::Base
|
|
170
171
|
current_user.restore_organization_progress!(Organization.current)
|
171
172
|
end
|
172
173
|
end
|
174
|
+
|
175
|
+
def limited_query?
|
176
|
+
params[:limit].present?
|
177
|
+
end
|
173
178
|
end
|
@@ -1,8 +1,21 @@
|
|
1
1
|
class ComplementsController < GuideContainerController
|
2
|
+
include Mumuki::Laboratory::Controllers::ValidateAccessMode
|
2
3
|
|
3
4
|
private
|
4
5
|
|
5
6
|
def subject
|
6
7
|
@complement ||= Complement.find_by(id: params[:id])
|
7
8
|
end
|
9
|
+
|
10
|
+
def authorization_minimum_role
|
11
|
+
:ex_student
|
12
|
+
end
|
13
|
+
|
14
|
+
def subject_container
|
15
|
+
subject.guide
|
16
|
+
end
|
17
|
+
|
18
|
+
def contentless_subject?
|
19
|
+
subject_container.exercises.empty?
|
20
|
+
end
|
8
21
|
end
|
@@ -17,7 +17,9 @@ module ApplicationHelper
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def paginate(object, options = {})
|
20
|
-
|
20
|
+
unless limited_query?
|
21
|
+
super(object, {theme: 'bootstrap-5', pagination_class: 'flex-wrap justify-content-center'}.merge(options))
|
22
|
+
end
|
21
23
|
end
|
22
24
|
|
23
25
|
def last_box_class(trailing_boxes)
|
@@ -38,14 +38,14 @@ module DiscussionsHelper
|
|
38
38
|
|
39
39
|
def solve_discussion_params_for(user)
|
40
40
|
if user&.moderator_here?
|
41
|
-
{status: :pending_review, sort: :responses_count_asc,
|
41
|
+
{status: :pending_review, sort: :responses_count_asc, requires_attention: true}
|
42
42
|
else
|
43
43
|
{status: :opened, sort: :responses_count_desc}
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
def default_discussions_params
|
48
|
-
{status: :solved, sort: :
|
48
|
+
{status: :solved, sort: :created_at_desc, recent: true, limit: 15}
|
49
49
|
end
|
50
50
|
|
51
51
|
def user_avatar(user, image_class='')
|
@@ -17,30 +17,33 @@
|
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%
|
21
|
-
|
22
|
-
|
20
|
+
<% unless @book.chapters.empty? %>
|
21
|
+
<% if show_content?(@book) %>
|
22
|
+
<h2><%= t(:chapters) %></h2>
|
23
|
+
<% end %>
|
23
24
|
|
24
|
-
|
25
|
+
<% @book.chapter_visibilities_in(current_workspace).each do |it, enabled| %>
|
25
26
|
|
26
|
-
|
27
|
+
<% next unless show_content?(it.topic) %>
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
<div class="chapter-container">
|
30
|
+
<div class="chapter <%= enabled ? '' : 'mu-locked' %>">
|
31
|
+
<h3><%= it.number %>. <%= link_to_path_element it, mode: :plain %></h3>
|
32
|
+
<div class="text-box" <%= 'aria-label=""' unless enabled %>>
|
33
|
+
<%= it.description_teaser_html %>
|
34
|
+
</div>
|
33
35
|
</div>
|
34
|
-
</div>
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
<% unless enabled %>
|
38
|
+
<div class="text-center mu-lock">
|
39
|
+
<i class="fas fa-lock fa-5x"></i>
|
40
|
+
<p><%= t :locked_content %></p>
|
41
|
+
</div>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
43
45
|
<% end %>
|
46
|
+
|
44
47
|
<% if current_user? && @exams.present? %>
|
45
48
|
<h2><%= t(:exams) %></h2>
|
46
49
|
<% @exams.each_with_index do |it, index| %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="discussion-message-bubble-header">
|
4
4
|
<div class="discussion-message-bubble-title">
|
5
5
|
<%= linked_discussion_user_name user %>
|
6
|
-
<% if
|
6
|
+
<% if message.from_moderator? %>
|
7
7
|
<span class="moderator-badge"><%= t(:moderation) %></span>
|
8
8
|
<% end %>
|
9
9
|
<span class="message-date">
|
@@ -8,12 +8,10 @@
|
|
8
8
|
<%= t(:error_description, error: link_to_status_codes(403)).html_safe %>
|
9
9
|
</p>
|
10
10
|
<p class="mu-error-explanation-line">
|
11
|
-
<%= Organization.current.explain_error(
|
11
|
+
<%= Organization.current.explain_error(error_code, explanation).html_safe %>
|
12
12
|
</p>
|
13
13
|
<p class="mu-error-contact-line mu-maybe">
|
14
14
|
<%= t(:contact_administrator, link: mail_to_administrator).html_safe %>
|
15
15
|
</p>
|
16
16
|
</div>
|
17
17
|
<% end %>
|
18
|
-
|
19
|
-
|
@@ -8,8 +8,7 @@
|
|
8
8
|
<%= t(:error_description, error: link_to_status_codes(410)).html_safe %>
|
9
9
|
</p>
|
10
10
|
<p class="mu-error-explanation-line">
|
11
|
-
<%= Organization.current.explain_error(
|
11
|
+
<%= Organization.current.explain_error(error_code, explanation).html_safe %>
|
12
12
|
</p>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
15
|
-
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= t(:error_description, error: link_to_error_404).html_safe %>
|
9
9
|
</p>
|
10
10
|
<p class="mu-error-explanation-line">
|
11
|
-
<%= Organization.current.explain_error(
|
11
|
+
<%= Organization.current.explain_error(:not_found, :not_found_explanation).html_safe %>
|
12
12
|
</p>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
@@ -8,12 +8,16 @@
|
|
8
8
|
|
9
9
|
<%= yield if block_given? %>
|
10
10
|
|
11
|
-
|
12
|
-
<%= t :exercises %>
|
13
|
-
<%= restart_guide_link(@guide) if current_user && @stats.started? && @guide.resettable? %>
|
14
|
-
</h3>
|
11
|
+
<% unless @guide.exercises.empty? %>
|
15
12
|
|
16
|
-
|
13
|
+
<h3>
|
14
|
+
<%= t :exercises %>
|
15
|
+
<%= restart_guide_link(@guide) if current_user && @stats.started? && @guide.resettable? %>
|
16
|
+
</h3>
|
17
|
+
|
18
|
+
<%= render partial: 'layouts/progress_listing', locals: { guide: @guide } %>
|
19
|
+
|
20
|
+
<% end %>
|
17
21
|
|
18
22
|
<% if @stats&.done? %>
|
19
23
|
<div class="text-box">
|
@@ -41,27 +41,27 @@ module Mumuki::Laboratory::Controllers::DynamicErrors
|
|
41
41
|
def forbidden
|
42
42
|
message = "The operation on organization #{Organization.current} was forbidden to user #{current_user.uid} with permissions #{current_user.permissions}"
|
43
43
|
Rails.logger.info message
|
44
|
-
render_error 'forbidden', 403, locals: { explanation: :forbidden_explanation }, error_message: message
|
44
|
+
render_error 'forbidden', 403, locals: { error_code: :forbidden, explanation: :forbidden_explanation }, error_message: message
|
45
45
|
end
|
46
46
|
|
47
47
|
def disabled
|
48
|
-
render_error 'forbidden', 403, locals: { explanation: :disabled_explanation }
|
48
|
+
render_error 'forbidden', 403, locals: { error_code: :disabled, explanation: :disabled_explanation }
|
49
49
|
end
|
50
50
|
|
51
51
|
def blocked_forum
|
52
|
-
render_error 'forbidden', 403, locals: { explanation: :blocked_forum_explanation }
|
52
|
+
render_error 'forbidden', 403, locals: { error_code: :blocked_forum, explanation: :blocked_forum_explanation }
|
53
53
|
end
|
54
54
|
|
55
55
|
def gone
|
56
|
-
render_error 'gone', 410, locals: { explanation: :gone_explanation }
|
56
|
+
render_error 'gone', 410, locals: { error_code: :gone, explanation: :gone_explanation }
|
57
57
|
end
|
58
58
|
|
59
59
|
def unprepared_organization
|
60
|
-
render_error 'forbidden', 403, locals: { explanation: :unprepared_organization_explanation }
|
60
|
+
render_error 'forbidden', 403, locals: { error_code: :unprepared_organization, explanation: :unprepared_organization_explanation }
|
61
61
|
end
|
62
62
|
|
63
63
|
def disabled_organization
|
64
|
-
render_error 'gone', 410, locals: { explanation: :disabled_organization_explanation }
|
64
|
+
render_error 'gone', 410, locals: { error_code: :disabled_organization, explanation: :disabled_organization_explanation }
|
65
65
|
end
|
66
66
|
|
67
67
|
def render_error(template, status, options={})
|
@@ -6,7 +6,7 @@ module Mumuki::Laboratory::Controllers::ValidateAccessMode
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def validate_accessible!
|
9
|
-
current_access_mode.validate_content_here! subject_container
|
9
|
+
current_access_mode.validate_content_here! subject_container unless contentless_subject?
|
10
10
|
super
|
11
11
|
end
|
12
12
|
|
@@ -14,6 +14,10 @@ module Mumuki::Laboratory::Controllers::ValidateAccessMode
|
|
14
14
|
subject
|
15
15
|
end
|
16
16
|
|
17
|
+
def contentless_subject?
|
18
|
+
false
|
19
|
+
end
|
20
|
+
|
17
21
|
def accessible_subject
|
18
22
|
nil
|
19
23
|
end
|
@@ -291,7 +291,7 @@ es-CL:
|
|
291
291
|
one: '1 abierta'
|
292
292
|
other: '%{count} abiertas'
|
293
293
|
organizations: Organizaciones
|
294
|
-
organization_read_only_legend: 'Estás en
|
294
|
+
organization_read_only_legend: 'Estás en Modo Lectura: como el curso ya finalizó no podrás enviar soluciones'
|
295
295
|
other: Otro
|
296
296
|
out_of_attempts: Te quedaste sin intentos. ¡Sigue al próximo ejercicio!
|
297
297
|
output: Salida
|
@@ -300,7 +300,7 @@ es:
|
|
300
300
|
one: '1 abierta'
|
301
301
|
other: '%{count} abiertas'
|
302
302
|
organizations: Organizaciones
|
303
|
-
organization_read_only_legend: 'Estás en
|
303
|
+
organization_read_only_legend: 'Estás en Modo Lectura: como el curso ya finalizó no podrás enviar soluciones'
|
304
304
|
other: Otro
|
305
305
|
out_of_attempts: Te quedaste sin intentos. ¡Seguí al proximo ejercicio!
|
306
306
|
output: Salida
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20211020224011) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
16
|
enable_extension "plpgsql"
|
@@ -387,6 +387,7 @@ ActiveRecord::Schema.define(version: 20210929223144) do
|
|
387
387
|
t.datetime "deleted_at"
|
388
388
|
t.bigint "deleted_by_id"
|
389
389
|
t.bigint "assignment_id"
|
390
|
+
t.boolean "from_moderator"
|
390
391
|
t.index ["approved_by_id"], name: "index_messages_on_approved_by_id"
|
391
392
|
t.index ["assignment_id"], name: "index_messages_on_assignment_id"
|
392
393
|
t.index ["deleted_by_id"], name: "index_messages_on_deleted_by_id"
|
@@ -2,19 +2,28 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
feature 'Guides Flow', organization_workspace: :test do
|
4
4
|
let(:haskell) { create(:haskell) }
|
5
|
-
let
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
let(:exercises) do
|
6
|
+
[
|
7
|
+
create(:exercise, name: 'Foo', number: 1, description: 'Description of foo'),
|
8
|
+
create(:exercise, name: 'Bar', number: 2),
|
9
|
+
create(:exercise, name: 'Baz', number: 4)
|
10
|
+
]
|
11
|
+
end
|
12
|
+
let(:guide) do
|
13
|
+
create(:guide,
|
14
|
+
name: 'awesomeGuide',
|
15
|
+
description: 'An awesome guide',
|
16
|
+
language: haskell,
|
17
|
+
slug: 'foo/bar',
|
18
|
+
authors: authors,
|
19
|
+
exercises: exercises)
|
20
|
+
end
|
11
21
|
let(:authors) { nil }
|
12
22
|
let(:guide_not_in_path) { create(:guide) }
|
13
23
|
|
14
24
|
let!(:lesson) { create(:lesson, guide: guide) }
|
15
25
|
let!(:chapter) { create(:chapter, name: 'C1', lessons: [lesson]) }
|
16
26
|
|
17
|
-
|
18
27
|
let!(:complement) { create(:complement, name: 'a complement', exercises: [
|
19
28
|
create(:exercise, name: 'complementary exercise 1'),
|
20
29
|
create(:exercise, name: 'complementary exercise 2')
|
@@ -48,6 +57,19 @@ feature 'Guides Flow', organization_workspace: :test do
|
|
48
57
|
end
|
49
58
|
|
50
59
|
context 'existent guide' do
|
60
|
+
|
61
|
+
context 'no exercises' do
|
62
|
+
let(:exercises) { []}
|
63
|
+
|
64
|
+
scenario 'visit lesson by id' do
|
65
|
+
visit "/guides/#{lesson.guide.id}"
|
66
|
+
|
67
|
+
expect(page).to have_text('awesomeGuide')
|
68
|
+
expect(page).to have_text('An awesome guide')
|
69
|
+
expect(page).to_not have_text('Exercises')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
51
73
|
context 'no authors' do
|
52
74
|
let(:authors) { '' }
|
53
75
|
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
feature 'Immersive redirection Flow', organization_workspace: :test, subdomain_redirection_without_port: true do
|
4
4
|
def create_guide(name)
|
5
|
-
create(:guide, name: name)
|
5
|
+
create(:guide, name: name, exercises: [create(:exercise)])
|
6
6
|
end
|
7
7
|
|
8
8
|
def create_immersive_organization(name, guides)
|
@@ -6,7 +6,14 @@ feature 'not found public on app' do
|
|
6
6
|
let!(:some_orga) { create(:public_organization, name: 'someorga', profile: profile) }
|
7
7
|
|
8
8
|
let(:profile) { Mumuki::Domain::Organization::Profile.parse json }
|
9
|
-
let(:json)
|
9
|
+
let(:json) do
|
10
|
+
{
|
11
|
+
contact_email: 'some@email.com',
|
12
|
+
locale: 'en',
|
13
|
+
time_zone: 'Brasilia',
|
14
|
+
errors_explanations: { "not_found" => 'Some explanation'}
|
15
|
+
}
|
16
|
+
end
|
10
17
|
|
11
18
|
scenario 'when route does not exist in explicit central' do
|
12
19
|
set_subdomain_host! 'test'
|
@@ -14,7 +14,7 @@ feature 'Profile Flow', organization_workspace: :test do
|
|
14
14
|
'submission_id' => problem.assignments.last.submission_id,
|
15
15
|
'organization' => 'test-organization',
|
16
16
|
'message' => {
|
17
|
-
'sender' =>
|
17
|
+
'sender' => create(:user).uid,
|
18
18
|
'content' => 'a',
|
19
19
|
'created_at' => '1/1/1'}} }
|
20
20
|
let(:organization) { create(:organization, name: 'test-organization') }
|
@@ -14,14 +14,18 @@ feature 'Read Only Flow' do
|
|
14
14
|
let(:exercise122) { create :exercise, name: 'Exercise 122' }
|
15
15
|
let(:exercise211) { create :exercise, name: 'Exercise 211' }
|
16
16
|
let(:exercise212) { create :exercise, name: 'Exercise 212' }
|
17
|
+
let(:exercise31) { create :exercise, name: 'Exercise 31' }
|
18
|
+
let(:exercise32) { create :exercise, name: 'Exercise 32' }
|
17
19
|
let(:lesson11) { create :lesson, name: 'Lesson 11', exercises: [exercise111, exercise112] }
|
18
20
|
let(:lesson12) { create :lesson, name: 'Lesson 12', exercises: [exercise121, exercise122] }
|
19
21
|
let(:lesson21) { create :lesson, name: 'Lesson 21', exercises: [exercise211, exercise212] }
|
22
|
+
let(:complement3) { build :complement, name: 'Complement 3', exercises: [exercise31, exercise32] }
|
20
23
|
let(:chapter1) { create :chapter, name: 'Chapter 1', lessons: [lesson11, lesson12] }
|
21
24
|
let(:chapter2) { create :chapter, name: 'Chapter 2', lessons: [lesson21] }
|
22
|
-
let(:book) { create :book, chapters: [chapter1, chapter2] }
|
25
|
+
let(:book) { create :book, chapters: [chapter1, chapter2], complements: [complement3] }
|
23
26
|
|
24
27
|
let(:assignment111) { build :assignment, submitter: user, organization: organization, exercise: exercise111, status: :failed }
|
28
|
+
let(:assignment31) { build :assignment, submitter: user, organization: organization, exercise: exercise31, status: :failed }
|
25
29
|
let(:discussion111) { build :discussion, initiator: assignment111.user, item: assignment111.exercise, organization: assignment111.organization }
|
26
30
|
|
27
31
|
let(:assignment112) { build :assignment, submitter: other_user, organization: organization, exercise: exercise112, status: :failed }
|
@@ -32,6 +36,7 @@ feature 'Read Only Flow' do
|
|
32
36
|
before { set_current_user! user }
|
33
37
|
|
34
38
|
before { assignment111.save! }
|
39
|
+
before { assignment31.save! }
|
35
40
|
before { discussion111.save! }
|
36
41
|
before { discussion112.save! }
|
37
42
|
|
@@ -72,6 +77,12 @@ feature 'Read Only Flow' do
|
|
72
77
|
expect(page).to have_text('Exercise 112')
|
73
78
|
expect(page).to have_text('Continue this lesson!')
|
74
79
|
end
|
80
|
+
scenario 'show complement' do
|
81
|
+
visit "/complements/#{complement3.id}"
|
82
|
+
expect(page).to have_text('Complement 3')
|
83
|
+
expect(page).to have_text('Exercise 31')
|
84
|
+
expect(page).to have_text('Exercise 32')
|
85
|
+
end
|
75
86
|
scenario 'show exercise 111' do
|
76
87
|
visit "/exercises/#{exercise111.id}"
|
77
88
|
expect(page).to have_text('Exercise 111')
|
@@ -146,6 +157,12 @@ feature 'Read Only Flow' do
|
|
146
157
|
expect(page).to have_text('Exercise 112')
|
147
158
|
expect(page).to have_text('Continue this lesson!')
|
148
159
|
end
|
160
|
+
scenario 'show complement' do
|
161
|
+
visit "/complements/#{complement3.id}"
|
162
|
+
expect(page).to have_text('Complement 3')
|
163
|
+
expect(page).to have_text('Exercise 31')
|
164
|
+
expect(page).to have_text('Exercise 32')
|
165
|
+
end
|
149
166
|
scenario 'show exercise 111' do
|
150
167
|
visit "/exercises/#{exercise111.id}"
|
151
168
|
expect(page).to have_text('Exercise 111')
|
@@ -222,6 +239,12 @@ feature 'Read Only Flow' do
|
|
222
239
|
expect(page).not_to have_text('Exercise 112')
|
223
240
|
expect(page).not_to have_text('Continue this lesson!')
|
224
241
|
end
|
242
|
+
scenario 'show complement' do
|
243
|
+
visit "/complements/#{complement3.id}"
|
244
|
+
expect(page).to have_text('Complement 3')
|
245
|
+
expect(page).to have_text('Exercise 31')
|
246
|
+
expect(page).to_not have_text('Exercise 32')
|
247
|
+
end
|
225
248
|
scenario 'show exercise 111' do
|
226
249
|
visit "/exercises/#{exercise111.id}"
|
227
250
|
expect(page).to have_text('Exercise 111')
|
@@ -297,6 +320,10 @@ feature 'Read Only Flow' do
|
|
297
320
|
visit "/lessons/#{lesson11.id}"
|
298
321
|
expect(page).to have_text('You are not allowed to see this content')
|
299
322
|
end
|
323
|
+
scenario 'show complement' do
|
324
|
+
visit "/complements/#{complement3.id}"
|
325
|
+
expect(page).to have_text('You are not allowed to see this content')
|
326
|
+
end
|
300
327
|
scenario 'show exercise 111' do
|
301
328
|
visit "/exercises/#{exercise111.id}"
|
302
329
|
expect(page).to have_text('You are not allowed to see this content')
|
@@ -370,6 +397,12 @@ feature 'Read Only Flow' do
|
|
370
397
|
expect(page).to have_text('Exercise 112')
|
371
398
|
expect(page).to have_text('Continue this lesson!')
|
372
399
|
end
|
400
|
+
scenario 'show complement' do
|
401
|
+
visit "/complements/#{complement3.id}"
|
402
|
+
expect(page).to have_text('Complement 3')
|
403
|
+
expect(page).to have_text('Exercise 31')
|
404
|
+
expect(page).to have_text('Exercise 32')
|
405
|
+
end
|
373
406
|
scenario 'show exercise 111' do
|
374
407
|
visit "/exercises/#{exercise111.id}"
|
375
408
|
expect(page).to have_text('Exercise 111')
|
@@ -434,6 +467,10 @@ feature 'Read Only Flow' do
|
|
434
467
|
visit "/lessons/#{lesson11.id}"
|
435
468
|
expect(page).to have_text('This path hasn\'t started yet')
|
436
469
|
end
|
470
|
+
scenario 'show complemen' do
|
471
|
+
visit "/complemens/#{complement3.id}"
|
472
|
+
expect(page).to have_text('This path hasn\'t started yet')
|
473
|
+
end
|
437
474
|
scenario 'show exercise 111' do
|
438
475
|
visit "/exercises/#{exercise111.id}"
|
439
476
|
expect(page).to have_text('This path hasn\'t started yet')
|
@@ -495,6 +532,10 @@ feature 'Read Only Flow' do
|
|
495
532
|
visit "/lessons/#{lesson11.id}"
|
496
533
|
expect(page).to have_text('You are not allowed to see this content')
|
497
534
|
end
|
535
|
+
scenario 'show complement' do
|
536
|
+
visit "/complements/#{complement3.id}"
|
537
|
+
expect(page).to have_text('You are not allowed to see this content')
|
538
|
+
end
|
498
539
|
scenario 'show exercise 111' do
|
499
540
|
visit "/exercises/#{exercise111.id}"
|
500
541
|
expect(page).to have_text('You are not allowed to see this content')
|
@@ -550,6 +591,10 @@ feature 'Read Only Flow' do
|
|
550
591
|
visit "/lessons/#{lesson11.id}"
|
551
592
|
expect(page).to have_text('You are not allowed to see this content')
|
552
593
|
end
|
594
|
+
scenario 'show complement' do
|
595
|
+
visit "/complements/#{complement3.id}"
|
596
|
+
expect(page).to have_text('You are not allowed to see this content')
|
597
|
+
end
|
553
598
|
scenario 'show exercise 111' do
|
554
599
|
visit "/exercises/#{exercise111.id}"
|
555
600
|
expect(page).to have_text('You are not allowed to see this content')
|
@@ -623,6 +668,12 @@ feature 'Read Only Flow' do
|
|
623
668
|
expect(page).to have_text('Exercise 112')
|
624
669
|
expect(page).to have_text('Continue this lesson!')
|
625
670
|
end
|
671
|
+
scenario 'show complement' do
|
672
|
+
visit "/complements/#{complement3.id}"
|
673
|
+
expect(page).to have_text('Complement 3')
|
674
|
+
expect(page).to have_text('Exercise 31')
|
675
|
+
expect(page).to have_text('Exercise 32')
|
676
|
+
end
|
626
677
|
scenario 'show exercise 111' do
|
627
678
|
visit "/exercises/#{exercise111.id}"
|
628
679
|
expect(page).to have_text('Exercise 111')
|
@@ -697,6 +748,12 @@ feature 'Read Only Flow' do
|
|
697
748
|
expect(page).to have_text('Exercise 112')
|
698
749
|
expect(page).not_to have_text('Continue this lesson!')
|
699
750
|
end
|
751
|
+
scenario 'show complement' do
|
752
|
+
visit "/complements/#{complement3.id}"
|
753
|
+
expect(page).to have_text('Complement 3')
|
754
|
+
expect(page).to have_text('Exercise 31')
|
755
|
+
expect(page).to have_text('Exercise 32')
|
756
|
+
end
|
700
757
|
scenario 'show exercise 111' do
|
701
758
|
visit "/exercises/#{exercise111.id}"
|
702
759
|
expect(page).to have_text('Exercise 111')
|
@@ -763,6 +820,10 @@ feature 'Read Only Flow' do
|
|
763
820
|
visit "/lessons/#{lesson11.id}"
|
764
821
|
expect(page).to have_text('You are not allowed to see this content')
|
765
822
|
end
|
823
|
+
scenario 'show complement' do
|
824
|
+
visit "/complements/#{complement3.id}"
|
825
|
+
expect(page).to have_text('You are not allowed to see this content')
|
826
|
+
end
|
766
827
|
scenario 'show exercise 111' do
|
767
828
|
visit "/exercises/#{exercise111.id}"
|
768
829
|
expect(page).to have_text('You are not allowed to see this content')
|
@@ -819,6 +880,10 @@ feature 'Read Only Flow' do
|
|
819
880
|
visit "/lessons/#{lesson11.id}"
|
820
881
|
expect(page).to have_text('You are not allowed to see this content')
|
821
882
|
end
|
883
|
+
scenario 'show complement' do
|
884
|
+
visit "/complements/#{complement3.id}"
|
885
|
+
expect(page).to have_text('You are not allowed to see this content')
|
886
|
+
end
|
822
887
|
scenario 'show exercise 111' do
|
823
888
|
visit "/exercises/#{exercise111.id}"
|
824
889
|
expect(page).to have_text('You are not allowed to see this content')
|
@@ -889,6 +954,12 @@ feature 'Read Only Flow' do
|
|
889
954
|
expect(page).to have_text('Exercise 112')
|
890
955
|
expect(page).to have_text('Continue this lesson!')
|
891
956
|
end
|
957
|
+
scenario 'show complement' do
|
958
|
+
visit "/complements/#{complement3.id}"
|
959
|
+
expect(page).to have_text('Complement 3')
|
960
|
+
expect(page).to have_text('Exercise 31')
|
961
|
+
expect(page).to have_text('Exercise 32')
|
962
|
+
end
|
892
963
|
scenario 'show exercise 111' do
|
893
964
|
visit "/exercises/#{exercise111.id}"
|
894
965
|
expect(page).to have_text('Exercise 111')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 9.
|
33
|
+
version: 9.21.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 9.
|
40
|
+
version: 9.21.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mumukit-bridge
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|