-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
31 additions
and
18 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
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
6 changes: 6 additions & 0 deletions
6
app/views/wizards/steps/signup/abo_basic_login/_person_fields.html.haml
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-# Copyright (c) 2024, Schweizer Alpen-Club. This file is part of | ||
-# hitobito_sac_cas and licensed under the Affero General Public License version 3 | ||
-# or later. See the COPYING file at the top-level directory or at | ||
-# https://github.com/hitobito/hitobito_sac_cas. | ||
= render 'wizards/steps/signup/person_fields', c: |
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 |
---|---|---|
|
@@ -24,7 +24,6 @@ def complete_main_person_form | |
fill_in "Telefon", with: "+41 79 123 45 56" | ||
fill_in "wizards_signup_abo_basic_login_wizard_person_fields_zip_code", with: "8000" | ||
fill_in "wizards_signup_abo_basic_login_wizard_person_fields_town", with: "Zürich" | ||
check "Ich habe die Statuten gelesen und stimme diesen zu" | ||
check "Ich habe die Datenschutzerklärung gelesen und stimme diesen zu" | ||
end | ||
|
||
|
@@ -44,18 +43,18 @@ def expect_validation_error(message) | |
allow(Truemail).to receive(:valid?).with("[email protected]").and_return(false) | ||
visit group_self_registration_path(group_id: group.id) | ||
fill_in "E-Mail", with: "[email protected]" | ||
click_on "Weiter" | ||
click_button "Weiter" | ||
expect_active_step("E-Mail") | ||
expect_validation_error("E-Mail ist nicht gültig") | ||
end | ||
|
||
it "creates person" do | ||
visit group_self_registration_path(group_id: group.id) | ||
fill_in "E-Mail", with: "[email protected]" | ||
click_on "Weiter" | ||
click_button "Weiter" | ||
complete_main_person_form | ||
expect do | ||
click_on "Registrieren" | ||
click_button "SAC-KONTO ERSTELLEN" | ||
expect(page).to have_css "#error_explanation, #flash > .alert" | ||
end.to change { Person.count }.by(1) | ||
expect(Person.last.roles.last.delete_on).not_to be_nil | ||
|
@@ -64,12 +63,12 @@ def expect_validation_error(message) | |
it "subscribes to mailinglist" do | ||
visit group_self_registration_path(group_id: group) | ||
fill_in "E-Mail", with: "[email protected]" | ||
click_on "Weiter" | ||
click_button "Weiter" | ||
complete_main_person_form | ||
check "Ich möchte einen Newsletter abonnieren" | ||
|
||
expect do | ||
click_on "Registrieren" | ||
click_button "SAC-KONTO ERSTELLEN" | ||
expect(page).to have_css "#error_explanation, #flash > .alert" | ||
end.to change { Person.count }.by(1) | ||
|
||
|
@@ -84,12 +83,12 @@ def expect_validation_error(message) | |
it "opts out of mailinglist" do | ||
visit group_self_registration_path(group_id: group) | ||
fill_in "E-Mail", with: "[email protected]" | ||
click_on "Weiter" | ||
click_button "Weiter" | ||
complete_main_person_form | ||
uncheck "Ich möchte einen Newsletter abonnieren" | ||
|
||
expect do | ||
click_on "Registrieren" | ||
click_button "SAC-KONTO ERSTELLEN" | ||
expect(page).to have_css "#error_explanation, #flash > .alert" | ||
end.to change { Person.count }.by(1) | ||
|
||
|