mumuki-laboratory 8.3.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +1 -1
  3. data/app/assets/javascripts/mumuki_laboratory/application/upload.js +69 -14
  4. data/app/assets/stylesheets/mumuki_laboratory/application.scss +1 -0
  5. data/app/assets/stylesheets/mumuki_laboratory/application/_codemirror-themes.scss +1 -0
  6. data/app/assets/stylesheets/mumuki_laboratory/application/_layout.scss +3 -0
  7. data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +1 -0
  8. data/app/assets/stylesheets/mumuki_laboratory/application/codemirror-themes/_mu-light.scss +3 -0
  9. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_content_show.scss +15 -2
  10. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +31 -8
  11. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_medal.scss +1 -1
  12. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_menu.scss +35 -0
  13. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +11 -0
  14. data/app/controllers/api/base_controller.rb +0 -1
  15. data/app/controllers/api/courses_controller.rb +1 -1
  16. data/app/controllers/api/organizations_controller.rb +5 -2
  17. data/app/controllers/api/roles_controller.rb +4 -0
  18. data/app/controllers/api/users_controller.rb +6 -1
  19. data/app/controllers/application_controller.rb +1 -1
  20. data/app/controllers/concerns/with_authorization.rb +1 -16
  21. data/app/controllers/concerns/with_user_params.rb +4 -0
  22. data/app/controllers/discussions_messages_controller.rb +0 -1
  23. data/app/controllers/exam_authorization_requests_controller.rb +26 -0
  24. data/app/controllers/exam_registrations_controller.rb +6 -0
  25. data/app/controllers/users_controller.rb +8 -5
  26. data/app/helpers/application_helper.rb +4 -0
  27. data/app/helpers/breadcrumbs_helper.rb +4 -0
  28. data/app/helpers/content_view_helper.rb +19 -0
  29. data/app/helpers/exercise_input_helper.rb +8 -17
  30. data/app/helpers/icons_helper.rb +3 -11
  31. data/app/helpers/links_helper.rb +2 -2
  32. data/app/helpers/menu_bar_helper.rb +3 -3
  33. data/app/helpers/overlapped_buttons_helper.rb +10 -6
  34. data/app/helpers/progress_bar_helper.rb +2 -2
  35. data/app/helpers/user_menu_helper.rb +18 -0
  36. data/app/views/chapters/show.html.erb +17 -16
  37. data/app/views/complements/show.html.erb +1 -1
  38. data/app/views/discussions/_message.html.erb +7 -7
  39. data/app/views/exam_authorization_requests/show.html.erb +17 -0
  40. data/app/views/exam_registrations/show.html.erb +37 -0
  41. data/app/views/exams/show.html.erb +1 -1
  42. data/app/views/{layouts → exercises}/_exercise_skipped.html.erb +0 -0
  43. data/app/views/exercises/_exercise_title_icons.html.erb +4 -0
  44. data/app/views/exercises/show.html.erb +5 -8
  45. data/app/views/{layouts → guides}/_guide.html.erb +3 -3
  46. data/app/views/guides/_guide_container.html.erb +24 -0
  47. data/app/views/{layouts → guides}/_guide_title_icons.html.erb +1 -3
  48. data/app/views/layouts/_progress_bar.html.erb +9 -7
  49. data/app/views/layouts/_progress_listing.html.erb +5 -5
  50. data/app/views/layouts/_user_menu.html.erb +21 -0
  51. data/app/views/layouts/application.html.erb +1 -6
  52. data/app/views/layouts/exercise_inputs/editors/_upload.html.erb +11 -2
  53. data/app/views/lessons/show.html.erb +1 -1
  54. data/app/views/notifications/_discussion.html.erb +1 -0
  55. data/app/views/notifications/_dropdown.html.erb +13 -0
  56. data/app/views/notifications/_exam_authorization_request.html.erb +1 -0
  57. data/app/views/notifications/_exam_registration.html.erb +1 -0
  58. data/app/views/notifications/_message.html.erb +1 -0
  59. data/app/views/users/_user_form.html.erb +10 -8
  60. data/app/views/users/discussions.html.erb +28 -0
  61. data/app/views/users/edit.html.erb +1 -1
  62. data/app/views/users/messages.html.erb +27 -0
  63. data/app/views/users/show.html.erb +4 -51
  64. data/app/views/users/terms.html.erb +2 -2
  65. data/config/routes.rb +6 -0
  66. data/lib/mumuki/laboratory/controllers/notifications.rb +3 -22
  67. data/lib/mumuki/laboratory/locales/en.yml +35 -18
  68. data/lib/mumuki/laboratory/locales/es-CL.yml +26 -9
  69. data/lib/mumuki/laboratory/locales/es.yml +31 -15
  70. data/lib/mumuki/laboratory/locales/pt.yml +28 -11
  71. data/lib/mumuki/laboratory/version.rb +1 -1
  72. data/spec/controllers/exam_authorization_requests_controller_spec.rb +40 -0
  73. data/spec/controllers/exam_registrations_controller_spec.rb +19 -0
  74. data/spec/controllers/organizations_api_controller_spec.rb +16 -9
  75. data/spec/dummy/db/schema.rb +24 -0
  76. data/spec/features/exercise_flow_spec.rb +3 -3
  77. data/spec/features/login_flow_spec.rb +1 -1
  78. data/spec/features/menu_bar_spec.rb +24 -24
  79. data/spec/features/notifications_flow_spec.rb +46 -0
  80. data/spec/features/profile_flow_spec.rb +6 -9
  81. data/spec/features/terms_flow_spec.rb +30 -0
  82. data/spec/javascripts/bridge-spec.js +2 -2
  83. data/spec/javascripts/csrf-token-spec.js +2 -2
  84. data/spec/javascripts/editors-spec.js +7 -9
  85. data/spec/javascripts/elipsis-spec.js +4 -4
  86. data/spec/javascripts/events-spec.js +7 -7
  87. data/spec/javascripts/exercise-spec.js +7 -8
  88. data/spec/javascripts/global-spec.js +3 -3
  89. data/spec/javascripts/i18n-spec.js +23 -20
  90. data/spec/javascripts/kids-button-spec.js +6 -8
  91. data/spec/javascripts/results-renderers-spec.js +5 -5
  92. data/spec/javascripts/speech-bubble-renderer-spec.js +2 -3
  93. data/spec/javascripts/submissions-store-spec.js +14 -14
  94. data/spec/javascripts/sync-mode-spec.js +3 -3
  95. data/spec/javascripts/timeout-spec.js +2 -2
  96. data/spec/javascripts/timer-spec.js +2 -2
  97. data/spec/javascripts/upload-spec.js +80 -0
  98. metadata +129 -103
  99. data/app/views/layouts/_guide_container.html.erb +0 -28
@@ -69,26 +69,37 @@ pt:
69
69
  disabled_explanation: Você está tentando acessar um recurso que foi desativado ou removido permanentemente
70
70
  disabled_organization_explanation: Este curso terminou
71
71
  discussion_description_placeholder: Você pode adicionar mais informações sobre sua dúvida
72
+ new_discussion_message: Nova mensagem em %{title}
72
73
  discussion_updated: Consulta actualizada
73
74
  discussions: Consultas
75
+ discussions_will_be_here: As perguntas que você fizer no espaço de consulta aparecerão aqui.
74
76
  download: Faça o download do que você fez
75
77
  edit: Editar
76
78
  edit_profile: Editar perfil
77
79
  editor_placeholder: ... Escreva sua solução aqui ...
78
80
  email: E-mail
79
- error_description: Isto é o que é conhecido como <span class = "error-link"> %{error} </ span>.
80
- error_401: erro 401
81
- error_403: erro 403
82
- error_404: erro 404
83
- error_410: erro 410
84
- error_500: erro 500
85
- errored: Opa! Sua solução não pode ser executada
86
81
  error:
87
82
  title:
88
83
  forbidden: Você não tem autorização para ver esse conteúdo
89
84
  gone: Opa! O conteúdo expirou
90
85
  internal_server_error: Opa! Algo não estava certo
91
86
  not_found: Opa! A página que você pesquisou não existe
87
+ error_401: erro 401
88
+ error_403: erro 403
89
+ error_404: erro 404
90
+ error_410: erro 410
91
+ error_500: erro 500
92
+ error_description: Isto é o que é conhecido como <span class = "error-link"> %{error} </ span>.
93
+ errored: Opa! Sua solução não pode ser executada
94
+ exam_authorization_request_approved_html: Sua solicitação foi aprovada, não se esqueça de conectar em <strong>%{date}</strong>. Boa sorte!
95
+ exam_authorization_request_created: Seu registro de exame foi salvo com sucesso!
96
+ exam_authorization_request_rejected: Seu pedido foi rejeitado.
97
+ exam_authorization_request_saved: Seu registro de exame foi modificado com sucesso!
98
+ exam_authorization_request_updated: Há notícias sobre seu registro para %{description}
99
+ exam_registration_choose_exam: Selecione o dia e a hora em que gostaria de fazer o exame
100
+ exam_registration_explanation_html: Você tem tempo até <strong>%{date}</strong> para se inscrever. Após essa data, sua inscrição será avaliada e você receberá uma confirmação. <br> Não se esqueça de verificar as notificações!
101
+ exam_registration_open: "¡Inscrições abertas para %{description}!"
102
+ exam_registration_to: Inscrição a %{description}
92
103
  exams: Examesca
93
104
  exercise: Exercício
94
105
  exercise_count: exercícios
@@ -103,6 +114,7 @@ pt:
103
114
  failed: Sua solução não passou as provas
104
115
  feedback: Problemas que encontramos
105
116
  female: Feminino
117
+ file_exceeds_max_size: "O tamanho do arquivo não deve exceder %{size_kb}kb. Selecione outro arquivo."
106
118
  finish: Terminar
107
119
  first_name: Nome
108
120
  forbidden_explanation: Você poderia ter entrado com uma conta incorreta?
@@ -110,7 +122,7 @@ pt:
110
122
  forum: Espaço de Consulta
111
123
  forum_terms: Regras do Espaço de Consulta
112
124
  forum_terms_link: Se você tiver alguma dúvida, consulte as %{terms_link}
113
- fullscreen: Tela completa
125
+ fullscreen: Tela cheia (F11)
114
126
  gender: Gênero
115
127
  get_messages: Ver mensagens
116
128
  go_to: Vá para %{organization}
@@ -126,6 +138,7 @@ pt:
126
138
  home: Home
127
139
  hour: hora
128
140
  hours: horas
141
+ important_info: Informação importante
129
142
  initial_state: Tabuleiro inicial
130
143
  insert_file_name: Insira um nome de arquivo
131
144
  invitation: Convite para o curso
@@ -161,9 +174,12 @@ pt:
161
174
  messages_error: As mensagens acima não estão disponíveis no momento. Eu tentei novamente mais tarde!
162
175
  minute: minuto
163
176
  minutes: minutos
164
- more_messages: Ver as mensagens anteriores
177
+ moderation: Mentoria
165
178
  moderator: Mentor
179
+ more_messages: Ver as mensagens anteriores
180
+ my_account: Minha conta
166
181
  my_doubts: Minhas duvidas
182
+ my_profile: Meu perfil
167
183
  name: Nome
168
184
  navigation_continue: "Próximo %{kind}: %{sibling}"
169
185
  navigation_next: Próximo %{kind}
@@ -174,6 +190,7 @@ pt:
174
190
  new: Novo
175
191
  new_message: Você tem dúvidas? Levante a mão!
176
192
  new_message_placeholder: Escreva sua mensagem para o seu professor aqui ...
193
+ new_message_received: Você tem uma nova mensagem de %{sender}
177
194
  next_exercise: Em seguida
178
195
  next_guide: Próxima Lição %{nome}
179
196
  no_discussions: Não encontramos consultas que correspondam à sua pesquisa.
@@ -187,6 +204,7 @@ pt:
187
204
  not_found: A página que você pesquisou não existe!
188
205
  not_found_explanation: Olhe se você escreveu o endereço corretamente.
189
206
  not_in_any_organizations: Parece que você ainda não está em nenhuma organização!
207
+ notifications: Notificações
190
208
  notify_problem_with_exercise: Relatar um erro
191
209
  office: Secretariado
192
210
  only_landscape_support: Por favor, gire seu tablet ou celular para realizar exercícios
@@ -210,7 +228,6 @@ pt:
210
228
  previous_exercise: Anterior
211
229
  problem_with_exercise: '[Mumuki] Erro com exercício %{title}'
212
230
  processing_your_solution: Estamos processando sua solução
213
- profile: Perfil
214
231
  profile_of: Perfil de %{username}
215
232
  programming_since: Sou programador
216
233
  progress: Progresso
@@ -226,6 +243,7 @@ pt:
226
243
  running: processamento
227
244
  save: Salvar
228
245
  see_context: Veja a animação desde o início
246
+ select_file: Selecione o arquivo
229
247
  send: Enviar
230
248
  sending_solution: Solução de envio
231
249
  show: Mostrar
@@ -282,7 +300,6 @@ pt:
282
300
  unmeet_expectations: Objetivos que não foram atendidos
283
301
  unprepared_organization_explanation: Este curso ainda não começou
284
302
  unsubscribe: Cancelar subscrição
285
- upload_solution: Carregar solução
286
303
  uploading_solution: Uploading solution
287
304
  user: Usuário
288
305
  user_data_updated: Os seus dados foram atualizados corretamente
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Laboratory
3
- VERSION = '8.3.0'
3
+ VERSION = '9.0.0'
4
4
  end
5
5
  end
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ describe ExamAuthorizationRequestsController, type: :controller, organization_workspace: :test do
4
+ let(:user) { create(:user) }
5
+ let(:exam) { create(:exam) }
6
+ let(:exam_registration) { create(:exam_registration, exams: [exam]) }
7
+
8
+ before { set_current_user! user }
9
+
10
+ describe 'show' do
11
+ context 'when authorization does not exist' do
12
+ before { get :show, params: {id: 0} }
13
+ it { expect(response.status).to eq 404 }
14
+ end
15
+
16
+ context 'when authorization exists' do
17
+ let(:exam_authorization_request) { create(:exam_authorization_request, user: user, exam_registration: exam_registration) }
18
+ let!(:notification) { create(:notification, target: exam_authorization_request, user: user) }
19
+
20
+ before { get :show, params: {id: exam_authorization_request.id} }
21
+
22
+ it { expect(response.status).to eq 200 }
23
+ it { expect(notification.reload.read).to be_truthy }
24
+ end
25
+ end
26
+
27
+ describe 'create' do
28
+ let!(:notification) { create(:notification, target: exam_registration, user: user) }
29
+
30
+ before do
31
+ post :create, params: {
32
+ exam_authorization_request: { exam_id: exam.id, exam_registration_id: exam_registration.id }
33
+ }
34
+ end
35
+
36
+ it { expect(response.status).to eq 204 }
37
+ it { expect(exam_registration.authorization_requests.length).to be 1 }
38
+ it { expect(notification.reload.read).to be_truthy }
39
+ end
40
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe ExamRegistrationsController, type: :controller, organization_workspace: :test do
4
+ describe 'show' do
5
+ context 'when registration does not exist' do
6
+ before { get :show, params: {id: 0} }
7
+
8
+ it { expect(response.status).to eq 404 }
9
+ end
10
+
11
+ context 'when registration exists' do
12
+ let!(:registration) { create(:exam_registration) }
13
+
14
+ before { get :show, params: {id: registration.id} }
15
+
16
+ it { expect(response.status).to eq 200 }
17
+ end
18
+ end
19
+ end
@@ -34,7 +34,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
34
34
 
35
35
  context 'with wildcard permissions' do
36
36
  before { get :index }
37
- let(:api_client) { create :api_client, role: :janitor, grant: '*' }
37
+ let(:api_client) { create :api_client, role: :admin, grant: '*' }
38
38
 
39
39
  it { check_status! 200 }
40
40
 
@@ -42,7 +42,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
42
42
  end
43
43
  context 'with non-wildcard permissions' do
44
44
  before { get :index }
45
- let(:api_client) { create :api_client, role: :janitor, grant: 'public/*:private/*' }
45
+ let(:api_client) { create :api_client, role: :admin, grant: 'public/*:private/*' }
46
46
 
47
47
  it { check_status! 200 }
48
48
 
@@ -54,14 +54,14 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
54
54
  context 'with a public organization' do
55
55
  before { get :show, params: {id: 'public'} }
56
56
 
57
- context 'with a user without janitor permissions' do
57
+ context 'with a user without admin permissions' do
58
58
  let(:api_client) { create :api_client, role: :editor, grant: 'another_organization/*' }
59
59
 
60
60
  it { check_status! 403 }
61
61
  end
62
62
 
63
- context 'with a user with janitor' do
64
- let(:api_client) { create :api_client, role: :janitor, grant: 'public/*' }
63
+ context 'with a user with admin' do
64
+ let(:api_client) { create :api_client, role: :admin, grant: 'public/*' }
65
65
 
66
66
  it { check_status! 200 }
67
67
  end
@@ -70,7 +70,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
70
70
  context 'with an organization that has a dot in its name' do
71
71
  before { get :show, params: {id: 'dot.org'} }
72
72
 
73
- let(:api_client) { create :api_client, role: :janitor, grant: 'dot.org/*' }
73
+ let(:api_client) { create :api_client, role: :admin, grant: 'dot.org/*' }
74
74
  it { check_status! 200 }
75
75
  end
76
76
 
@@ -84,7 +84,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
84
84
  end
85
85
 
86
86
  context 'with a user with permissions' do
87
- let(:api_client) { create :api_client, role: :janitor, grant: 'private/*' }
87
+ let(:api_client) { create :api_client, role: :admin, grant: 'private/*' }
88
88
 
89
89
  it { check_status! 200 }
90
90
  it { expect(response.body).to json_like(private_organization.to_resource_h) }
@@ -181,7 +181,7 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
181
181
  end
182
182
 
183
183
 
184
- context 'with not-janitor permissions' do
184
+ context 'with non-admin permissions' do
185
185
  let(:api_client) { create :api_client, role: :editor, grant: '*' }
186
186
 
187
187
  it { check_status! 403 }
@@ -228,7 +228,14 @@ describe Api::OrganizationsController, type: :controller, organization_workspace
228
228
  it { expect(updated_organizaton.contact_email).to eq 'second_email@gmail.com' }
229
229
  end
230
230
 
231
- context 'with not-janitor permissions' do
231
+ context 'with janitor permissions' do
232
+ let(:api_client) { create :api_client, role: :janitor, grant: 'existing-organization/*' }
233
+ before { put :update, params: {id: 'existing-organization', organization: update_json} }
234
+
235
+ it { check_status! 403 }
236
+ end
237
+
238
+ context 'with non-admin permissions' do
232
239
  let(:api_client) { create :api_client, role: :teacher, grant: 'existing-organization/*' }
233
240
  before { put :update, params: {id: 'existing-organization', organization: update_json} }
234
241
 
@@ -71,6 +71,29 @@ ActiveRecord::Schema.define(version: 20210119190204) do
71
71
  t.index ["slug"], name: "index_books_on_slug", unique: true
72
72
  end
73
73
 
74
+ create_table "certificate_programs", force: :cascade do |t|
75
+ t.string "title"
76
+ t.string "template_html_erb"
77
+ t.text "description"
78
+ t.string "background_image_url"
79
+ t.bigint "organization_id"
80
+ t.datetime "created_at", null: false
81
+ t.datetime "updated_at", null: false
82
+ t.index ["organization_id"], name: "index_certificate_programs_on_organization_id"
83
+ end
84
+
85
+ create_table "certificates", force: :cascade do |t|
86
+ t.bigint "user_id"
87
+ t.bigint "certificate_program_id"
88
+ t.datetime "start_date"
89
+ t.datetime "end_date"
90
+ t.string "code"
91
+ t.datetime "created_at", null: false
92
+ t.datetime "updated_at", null: false
93
+ t.index ["certificate_program_id"], name: "index_certificates_on_certificate_program_id"
94
+ t.index ["user_id"], name: "index_certificates_on_user_id"
95
+ end
96
+
74
97
  create_table "chapters", id: :serial, force: :cascade do |t|
75
98
  t.datetime "created_at"
76
99
  t.datetime "updated_at"
@@ -482,6 +505,7 @@ ActiveRecord::Schema.define(version: 20210119190204) do
482
505
  t.datetime "legal_terms_accepted_at"
483
506
  t.datetime "forum_terms_accepted_at"
484
507
  t.boolean "banned_from_forum"
508
+ t.boolean "uppercase_mode"
485
509
  t.index ["avatar_type", "avatar_id"], name: "index_users_on_avatar_type_and_avatar_id"
486
510
  t.index ["disabled_at"], name: "index_users_on_disabled_at"
487
511
  t.index ["last_organization_id"], name: "index_users_on_last_organization_id"
@@ -106,19 +106,19 @@ feature 'Exercise Flow', organization_workspace: :test do
106
106
  scenario 'visit exercise by id, standalone mode' do
107
107
  visit "/exercises/#{problem_1.id}"
108
108
  expect(page).to have_text('Functional Programming 1')
109
- expect(page).to have_text('Profile')
109
+ expect(page).to have_text('My account')
110
110
  end
111
111
  scenario 'visit exercise by id, embedded mode in non embeddable organization' do
112
112
  visit "/exercises/#{problem_1.id}?embed=true"
113
113
  expect(page).to have_text('Functional Programming 1')
114
- expect(page).to have_text('Profile')
114
+ expect(page).to have_text('My account')
115
115
  end
116
116
  scenario 'visit exercise by id, embedded mode in embeddable organization' do
117
117
  Organization.current.tap { |it| it.embeddable = true }.save!
118
118
 
119
119
  visit "/exercises/#{problem_1.id}?embed=true"
120
120
  expect(page).to_not have_text('Functional Programming 1')
121
- expect(page).to_not have_text('Profile')
121
+ expect(page).to_not have_text('My account')
122
122
  end
123
123
  end
124
124
 
@@ -64,6 +64,6 @@ feature 'Login Flow', organization_workspace: :test do
64
64
 
65
65
  expect(page).to_not have_text('Sign in')
66
66
  expect(page).to have_text('Sign Out')
67
- expect(page).to have_text('Profile')
67
+ expect(page).to have_text('My profile')
68
68
  end
69
69
  end
@@ -16,7 +16,7 @@ feature 'menu bar' do
16
16
  scenario 'should not see menu bar' do
17
17
  visit '/'
18
18
 
19
- expect(page).not_to have_text('Profile')
19
+ expect(page).not_to have_text('My account')
20
20
  expect(page).not_to have_text('Classroom')
21
21
  expect(page).not_to have_text('Bibliotheca')
22
22
  end
@@ -30,7 +30,7 @@ feature 'menu bar' do
30
30
  scenario 'should not see menu bar' do
31
31
  visit '/'
32
32
 
33
- expect(page).not_to have_text('Profile')
33
+ expect(page).not_to have_text('My account')
34
34
  expect(page).not_to have_text('Classroom')
35
35
  expect(page).not_to have_text('Bibliotheca')
36
36
  expect(page).not_to have_text('Solve other\'s doubts')
@@ -48,11 +48,11 @@ feature 'menu bar' do
48
48
  let(:admin) { create(:user, permissions: {student: 'private/*', admin: 'private/*'}) }
49
49
  let(:owner) { create(:user, permissions: {student: 'private/*', owner: 'private/*'}) }
50
50
 
51
- scenario 'visitor should only see profile' do
51
+ scenario 'visitor should only see their account' do
52
52
  set_current_user! visitor
53
53
 
54
54
  visit '/'
55
- expect(page).to have_text('Profile')
55
+ expect(page).to have_text('My account')
56
56
  expect(page).not_to have_text('Classroom')
57
57
  expect(page).not_to have_text('Bibliotheca')
58
58
  expect(page).not_to have_text('Solve other\'s doubts')
@@ -60,23 +60,23 @@ feature 'menu bar' do
60
60
  end
61
61
 
62
62
  context 'student with no discussions should' do
63
- scenario 'only see profile if forum is not enabled' do
63
+ scenario 'only see their account if forum is not enabled' do
64
64
  set_current_user! student
65
65
 
66
66
  visit '/'
67
- expect(page).to have_text('Profile')
67
+ expect(page).to have_text('My account')
68
68
  expect(page).not_to have_text('Classroom')
69
69
  expect(page).not_to have_text('Bibliotheca')
70
70
  expect(page).not_to have_text('Solve other\'s doubts')
71
71
  expect(page).not_to have_text('My doubts')
72
72
  end
73
73
 
74
- scenario 'see profile and solve_other_doubts links if forum is enabled' do
74
+ scenario 'see their account and solve_other_doubts links if forum is enabled' do
75
75
  set_current_user! student
76
76
  private_organization.update! forum_enabled: true
77
77
 
78
78
  visit '/'
79
- expect(page).to have_text('Profile')
79
+ expect(page).to have_text('My account')
80
80
  expect(page).not_to have_text('Classroom')
81
81
  expect(page).not_to have_text('Bibliotheca')
82
82
  expect(page).to have_text('Solve other\'s doubts')
@@ -87,12 +87,12 @@ feature 'menu bar' do
87
87
  context 'student with discussions should' do
88
88
  let(:discussion) { create(:discussion, item: lesson.exercises.last, initiator: student)}
89
89
 
90
- scenario 'only see profile if forum is not enabled' do
90
+ scenario 'only see their account if forum is not enabled' do
91
91
  set_current_user! student
92
92
  student.subscribe_to! discussion
93
93
 
94
94
  visit '/'
95
- expect(page).to have_text('Profile')
95
+ expect(page).to have_text('My account')
96
96
  expect(page).not_to have_text('Classroom')
97
97
  expect(page).not_to have_text('Bibliotheca')
98
98
  expect(page).not_to have_text('Solve other\'s doubts')
@@ -105,21 +105,21 @@ feature 'menu bar' do
105
105
  student.subscribe_to! discussion
106
106
 
107
107
  visit '/'
108
- expect(page).to have_text('Profile')
108
+ expect(page).to have_text('My account')
109
109
  expect(page).not_to have_text('Classroom')
110
110
  expect(page).not_to have_text('Bibliotheca')
111
111
  expect(page).to have_text('Solve other\'s doubts')
112
112
  expect(page).to have_text('My doubts')
113
113
  end
114
114
 
115
- scenario 'only see profile if forum is enabled in a forum_only_for_trusted organization' do
115
+ scenario 'only see their account if forum is enabled in a forum_only_for_trusted organization' do
116
116
  set_current_user! student
117
117
  student.subscribe_to! discussion
118
118
  private_organization.update! forum_enabled: true
119
119
  private_organization.update! forum_only_for_trusted: true
120
120
 
121
121
  visit '/'
122
- expect(page).to have_text('Profile')
122
+ expect(page).to have_text('My account')
123
123
  expect(page).not_to have_text('Classroom')
124
124
  expect(page).not_to have_text('Bibliotheca')
125
125
  expect(page).not_to have_text('Solve other\'s doubts')
@@ -134,7 +134,7 @@ feature 'menu bar' do
134
134
  private_organization.update! forum_only_for_trusted: true
135
135
 
136
136
  visit '/'
137
- expect(page).to have_text('Profile')
137
+ expect(page).to have_text('My account')
138
138
  expect(page).not_to have_text('Classroom')
139
139
  expect(page).not_to have_text('Bibliotheca')
140
140
  expect(page).to have_text('Solve other\'s doubts')
@@ -142,54 +142,54 @@ feature 'menu bar' do
142
142
  end
143
143
  end
144
144
 
145
- scenario 'teacher should see profile and classroom' do
145
+ scenario 'teacher should see their account and classroom' do
146
146
  set_current_user! teacher
147
147
 
148
148
  visit '/'
149
149
 
150
- expect(page).to have_text('Profile')
150
+ expect(page).to have_text('My account')
151
151
  expect(page).to have_text('Classroom')
152
152
  expect(page).not_to have_text('Bibliotheca')
153
153
  expect(page).not_to have_text('Solve other\'s doubts')
154
154
  expect(page).not_to have_text('My doubts')
155
155
  end
156
156
 
157
- scenario 'writer should see profile and bibliotheca' do
157
+ scenario 'writer should see their account and bibliotheca' do
158
158
  set_current_user! writer
159
159
 
160
160
  visit '/'
161
161
 
162
- expect(page).to have_text('Profile')
162
+ expect(page).to have_text('My account')
163
163
  expect(page).not_to have_text('Classroom')
164
164
  expect(page).to have_text('Bibliotheca')
165
165
  end
166
166
 
167
- scenario 'janitor should see profile and classroom' do
167
+ scenario 'janitor should see their account and classroom' do
168
168
  set_current_user! janitor
169
169
 
170
170
  visit '/'
171
171
 
172
- expect(page).to have_text('Profile')
172
+ expect(page).to have_text('My account')
173
173
  expect(page).to have_text('Classroom')
174
174
  expect(page).not_to have_text('Bibliotheca')
175
175
  end
176
176
 
177
- scenario 'admin should see profile, classroom and bibliotheca' do
177
+ scenario 'admin should their account, classroom and bibliotheca' do
178
178
  set_current_user! admin
179
179
 
180
180
  visit '/'
181
181
 
182
- expect(page).to have_text('Profile')
182
+ expect(page).to have_text('My account')
183
183
  expect(page).to have_text('Classroom')
184
184
  expect(page).to have_text('Bibliotheca')
185
185
  end
186
186
 
187
- scenario 'owner should see profile, classroom and bibliotheca' do
187
+ scenario 'owner should see their account, classroom and bibliotheca' do
188
188
  set_current_user! owner
189
189
 
190
190
  visit '/'
191
191
 
192
- expect(page).to have_text('Profile')
192
+ expect(page).to have_text('My account')
193
193
  expect(page).to have_text('Classroom')
194
194
  expect(page).to have_text('Bibliotheca')
195
195
  end