Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
47e66be3
Commit
47e66be3
authored
Nov 14, 2018
by
Tugce Nur Tas
Browse files
Merge branch 'changes/require-semester-feedback-fields' into 'develop'
changes/require-semester-feedback-fields See merge request
!842
parents
ce76a2e2
401d291c
Pipeline
#30777
passed with stage
in 35 minutes and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/models/semester_feedback.rb
View file @
47e66be3
...
...
@@ -5,4 +5,6 @@ class SemesterFeedback < ApplicationRecord
belongs_to
:semester_process_volunteer
has_one
:semester_process
,
through: :semester_process_volunteer
has_one
:volunteer
,
through: :semester_process_volunteer
validates
:goals
,
:achievements
,
:future
,
presence:
true
end
test/system/semester_feedback_test.rb
View file @
47e66be3
...
...
@@ -43,6 +43,7 @@ class SemesterFeedbackTest < ApplicationSystemTestCase
end
test
'you should be able to add hours on run'
do
fill_in_required_feedback_fields
assert_equal
@subject_volunteer
.
hours
.
count
,
0
fill_in
'Stunden'
,
with:
10
check
'Ich verzichte auf die Auszahlung von Spesen.'
...
...
@@ -55,6 +56,7 @@ class SemesterFeedbackTest < ApplicationSystemTestCase
end
test
'iban and bank has to be filled'
do
fill_in_required_feedback_fields
uncheck
'Ich verzichte auf die Auszahlung von Spesen.'
fill_in
'IBAN'
,
with:
''
fill_in
'Bank'
,
with:
''
...
...
@@ -67,9 +69,7 @@ class SemesterFeedbackTest < ApplicationSystemTestCase
end
test
'it should store the info that user inputs'
do
fill_in
'Was waren die wichtigsten Inhalte (oder Ziele) Ihres Einsatzes in den letzten Monaten?'
,
with:
'being on time'
fill_in
'Was konnte in den letzten Monaten erreicht werden?'
,
with:
'everything'
fill_in
'Soll der Einsatz weiterlaufen und wenn ja, mit welchen Inhalten (Zielen)?'
,
with:
'continue'
fill_in_required_feedback_fields
fill_in
'Kommentare'
,
with:
'nothing'
check
'Ich wünsche ein Gespräch mit meiner/meinem Freiwilligenverantwortlichen.'
fill_in
'Stunden'
,
with:
33
...
...
@@ -87,8 +87,15 @@ class SemesterFeedbackTest < ApplicationSystemTestCase
def
submit_feedback
(
semester_process_volunteer
)
visit
review_semester_semester_process_volunteer_path
(
semester_process_volunteer
)
fill_in_required_feedback_fields
check
'Ich verzichte auf die Auszahlung von Spesen.'
click_on
'Bestätigen'
,
match: :first
semester_process_volunteer
.
reload
end
def
fill_in_required_feedback_fields
fill_in
'Was waren die wichtigsten Inhalte (oder Ziele) Ihres Einsatzes in den letzten Monaten?'
,
with:
'being on time'
fill_in
'Was konnte in den letzten Monaten erreicht werden?'
,
with:
'everything'
fill_in
'Soll der Einsatz weiterlaufen und wenn ja, mit welchen Inhalten (Zielen)?'
,
with:
'continue'
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment