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
f97d6eb2
Verified
Commit
f97d6eb2
authored
Feb 01, 2018
by
Kaspar Vollenweider
👻
Browse files
fix remove volunteer group offers test
parent
a441475f
Pipeline
#13827
failed with stage
in 22 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/system/remove_volunteer_group_offers_test.rb
View file @
f97d6eb2
...
...
@@ -16,21 +16,21 @@ class RemoveVolunteerGroupOffersTest < ApplicationSystemTestCase
within
'.assignments-table'
do
assert
page
.
has_text?
"
#{
@ga1
.
volunteer
.
contact
.
full_name
}
"
\
"
#{
@ga1
.
responsible
?
'Responsible'
:
'Member'
}
#{
I18n
.
l
(
@ga1
.
period_start
)
}
"
assert
page
.
has_link?
'Bearbeiten'
,
href:
edit_group_assignment_path
(
@ga1
)
assert
page
.
has_link?
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga1
)
assert
page
.
has_link?
'Bearbeiten'
,
href:
edit_group_assignment_path
(
@ga1
,
redirect_to: :show
)
assert
page
.
has_link?
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga1
,
redirect_to: :show
)
refute
page
.
has_link?
'Beendigungsformular an Freiwillige/n'
,
href:
polymorphic_path
([
@ga1
,
ReminderMailing
],
action: :new_termination
)
assert
page
.
has_text?
"
#{
@ga2
.
volunteer
.
contact
.
full_name
}
"
\
"
#{
@ga2
.
responsible
?
'Responsible'
:
'Member'
}
#{
I18n
.
l
(
@ga2
.
period_start
)
}
"
assert
page
.
has_link?
'Bearbeiten'
,
href:
edit_group_assignment_path
(
@ga2
)
assert
page
.
has_link?
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga2
)
assert
page
.
has_link?
'Bearbeiten'
,
href:
edit_group_assignment_path
(
@ga2
,
redirect_to: :show
)
assert
page
.
has_link?
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga2
,
redirect_to: :show
)
end
end
test
'setting_period_end_with_today_shortcut'
do
login_as
@superadmin
visit
group_offer_path
(
@group_offer
)
click_link
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga1
)
click_link
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga1
,
redirect_to: :show
)
assert
page
.
has_text?
'Einsatzende wurde erfolgreich gesetzt.'
@ga1
.
reload
visit
group_offer_path
(
@group_offer
)
...
...
@@ -38,7 +38,7 @@ class RemoveVolunteerGroupOffersTest < ApplicationSystemTestCase
assert
page
.
has_text?
"
#{
@ga1
.
volunteer
.
contact
.
full_name
}
"
\
"
#{
@ga1
.
responsible
?
'Responsible'
:
'Member'
}
#{
I18n
.
l
(
@ga1
.
period_start
)
}
"
\
"
#{
I18n
.
l
(
@ga1
.
period_end
)
}
"
refute
page
.
has_link?
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga1
)
refute
page
.
has_link?
'Heute beenden'
,
href:
set_end_today_group_assignment_path
(
@ga1
,
redirect_to: :show
)
assert
page
.
has_link?
'Beendigungsformular an Freiwillige/n'
,
href:
polymorphic_path
([
@ga1
,
ReminderMailing
],
action: :new_termination
)
end
...
...
@@ -55,7 +55,7 @@ class RemoveVolunteerGroupOffersTest < ApplicationSystemTestCase
visit
group_offer_path
(
@group_offer
)
within
'.assignments-table'
do
assert
page
.
has_text?
'Responsible'
click_link
'Bearbeiten'
,
href:
edit_group_assignment_path
(
@ga1
)
click_link
'Bearbeiten'
,
href:
edit_group_assignment_path
(
@ga1
,
redirect_to: :show
)
end
uncheck
'Responsible'
click_button
'Update Group assignment'
...
...
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