-
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.
Add feature spec for all abo wizards
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 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 |
---|---|---|
|
@@ -155,4 +155,19 @@ def complete_last_page(date: Date.tomorrow, submit: true) | |
expect(page).to have_field("Geburtsdatum", with: "03.01.1924") | ||
end | ||
end | ||
|
||
it "has prefilled form when logged in" do | ||
people(:admin).update!(country: "CH") | ||
sign_in(people(:admin)) | ||
visit group_self_registration_path(group_id: group) | ||
expect_active_step "Personendaten" | ||
click_button "Weiter" | ||
expect(page).to have_text "[email protected]" | ||
check "Ich habe die AGB gelesen und stimme diesen zu" | ||
check "Ich habe die Datenschutzerklärung gelesen und stimme dieser zu" | ||
expect do | ||
click_button "ABO KOSTENPFLICHTIG BESTELLEN" | ||
expect(page).to have_css "#error_explanation, #flash > .alert" | ||
end.to change { Role.count }.by(1) | ||
end | ||
end |
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