-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/1335 Kein self service austritt für Magazin Abonnenten (#1375)
* Add ability spec for described case * Adjust ability * Add translation key for tooltip * Fix spec feature specs and add one spec to check for tooltip * Adjust translation * Adjust spec * Use correct character in spec * Update config/locales/wagon.de.yml --------- Co-authored-by: Raphael Nestler <[email protected]>
- Loading branch information
Showing
4 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1678,6 +1678,8 @@ de: | |
global: | ||
sac_cas/role/mitglied_common: | ||
no_permission: Für einen Austritt musst du dich an den Mitgliederdienst der Sektion wenden | ||
group/abo_magazin/abonnent: | ||
no_permission: "Eine Kündigung kann nur über den Mitgliederdienst des SAC erfolgen. Bitte schreibe eine E-Mail mit dem gewünschten Kündigungstermin sowie deinem Vor- und Nachnamen an [email protected]." | ||
|
||
sac_membership_configs: | ||
form: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,10 @@ | |
require "spec_helper" | ||
|
||
describe :roles_terminations, js: true do | ||
def visit_dialog(role) | ||
sign_in(role.person) | ||
let(:role) { roles(:abonnent_alpen) } | ||
|
||
def visit_dialog | ||
sign_in(people(:admin)) | ||
visit history_group_person_path(group_id: role.group_id, id: role.person_id) | ||
click_link(href: /#{new_group_role_termination_path(group_id: role.group_id, role_id: role.id)}/) | ||
|
||
|
@@ -20,11 +22,19 @@ def visit_dialog(role) | |
it "lists affected role and mentions person" do | ||
# when terminating the stammsektion role, the affected roles include | ||
# all zusatzektion roles as well | ||
visit_dialog(roles(:abonnent_alpen)) | ||
visit_dialog | ||
|
||
within(".modal-dialog") do | ||
expect(page).to have_content "SAC/CAS / Die Alpen DE / Abonnent" # roles(:mitglied) | ||
expect(page).to have_content(/Austritt.*#{roles(:abonnent_alpen).person.full_name}/) | ||
end | ||
end | ||
|
||
it "displays disabled button with tooltip when current_user is abonnent" do | ||
sign_in(role.person) | ||
visit history_group_person_path(group_id: role.group_id, id: role.person_id) | ||
|
||
expect(page).to have_css 'button[disabled="disabled"]', text: "Austritt" | ||
expect(page).to have_css('div[rel="tooltip"][title="Eine Kündigung kann nur über den Mitgliederdienst des SAC erfolgen. Bitte schreibe eine E-Mail mit dem gewünschten Kündigungstermin sowie deinem Vor- und Nachnamen an [email protected]."]') | ||
end | ||
end |