Commit a3eb4e25 authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou

Merge branch 'changes/german-translation-of-missions' into 'develop'

Changes/Remove semester, rename missions

See merge request !849
parents f0dbc76d 53f3ff62
Pipeline #31122 passed with stage
in 46 minutes and 53 seconds
......@@ -12,7 +12,6 @@ h1= t_title(:index)
th Status
th Freiwilige/r
th Einsätze
th Missions
th Ziele
th Erfolge
th Zukunft
......@@ -32,7 +31,6 @@ h1= t_title(:index)
- else
.label.label-warning Unbestätigt
td= link_to_if policy(Volunteer).edit?, spv.volunteer.contact.full_name, edit_volunteer_path(spv.volunteer)
td= spv.semester_t
td= render_missions(spv)
= td_truncate_content_modal(spv.render_feedback(:goals), 'Ziele', shorten_size: 300)
= td_truncate_content_modal(spv.render_feedback(:achievements), 'Erfolge', shorten_size: 300)
......
......@@ -30,6 +30,7 @@ FactoryBot.define do
end
sem_fb.volunteer = sem_fb.semester_process_volunteer.volunteer
sem_fb.author = sem_fb.volunteer.user
sem_fb.goals = sem_fb.semester_process_volunteer.semester_t
end
after(:create) do |sem_fb, evl|
......
......@@ -19,7 +19,7 @@ FactoryBot.define do
after(:create) do |sem_proc, evaluator|
if evaluator.build_volunteers
evaluator.volunteers_count.times do
create :semester_process_volunteer, :with_mission, semester_process: sem_proc
create :semester_process_volunteer, :with_mission, :with_feedbacks, semester_process: sem_proc
end
end
end
......
......@@ -3,23 +3,23 @@ require 'application_system_test_case'
class SemesterProcessVolunteersTest < ApplicationSystemTestCase
setup do
@current_semester = Semester.new
create :semester_process, :with_volunteers, semester: @current_semester.previous_s
create :semester_process, :with_volunteers, semester: @current_semester.previous_s(2)
create :semester_process, :with_volunteers, semester: @current_semester.previous_s(3)
@one_semester_back = create :semester_process, :with_volunteers, semester: @current_semester.previous_s
@two_semesters_back = create :semester_process, :with_volunteers, semester: @current_semester.previous_s(2)
@three_semesters_back = create :semester_process, :with_volunteers, semester: @current_semester.previous_s(3)
login_as create(:user)
visit semester_process_volunteers_path
end
test 'filter semester process volunteer shows previous semester by default' do
assert page.has_text? "#{@current_semester.previous_s[5]}. Semester #{@current_semester.previous_s[0..3]}"
assert_not page.has_text? "#{@current_semester.previous_s(2)[5]}. Semester #{@current_semester.previous_s(2)[0..3]}"
assert page.has_text? @one_semester_back.semester_process_volunteers.first.semester_feedbacks.first.goals
assert_not page.has_text? @two_semesters_back.semester_process_volunteers.first.semester_feedbacks.first.goals
end
test 'filter semester process volunteer on semester' do
click_button "Semester: #{@current_semester.previous_s[0..3]},#{@current_semester.previous_s[5]}", match: :first
click_link "#{@current_semester.previous_s(2)[5]}. Semester #{@current_semester.previous_s(2)[0..3]}"
assert_not page.has_text? "#{@current_semester.previous_s[5]}. Semester #{@current_semester.previous_s[0..3]}"
assert page.has_text? "#{@current_semester.previous_s(2)[5]}. Semester #{@current_semester.previous_s(2)[0..3]}"
assert_not page.has_text? "#{@current_semester.previous_s(3)[5]}. Semester #{@current_semester.previous_s(3)[0..3]}"
assert_not page.has_text? @one_semester_back.semester_process_volunteers.first.semester_feedbacks.first.goals
assert page.has_text? @two_semesters_back.semester_process_volunteers.first.semester_feedbacks.first.goals
assert_not page.has_text? @three_semesters_back.semester_process_volunteers.first.semester_feedbacks.first.goals
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment