|
57 | 57 | fill_in "Identity provider login endpoint", with: "https://example.com/sso"
|
58 | 58 | fill_in "Identity provider logout endpoint", with: "https://example.com/slo"
|
59 | 59 | fill_in "Public certificate of identity provider", with: CertificateHelper.valid_certificate.to_pem
|
| 60 | + check "Limit self registration" |
60 | 61 |
|
61 | 62 | click_link_or_button "Continue"
|
62 | 63 |
|
|
68 | 69 | click_link_or_button "Continue"
|
69 | 70 |
|
70 | 71 | # Mapping form
|
71 |
| - fill_in "Mapping for: Username", with: "login\nmail", fill_options: { clear: :backspace } |
72 |
| - fill_in "Mapping for: Email", with: "mail", fill_options: { clear: :backspace } |
73 |
| - fill_in "Mapping for: First name", with: "myName", fill_options: { clear: :backspace } |
74 |
| - fill_in "Mapping for: Last name", with: "myLastName", fill_options: { clear: :backspace } |
75 |
| - fill_in "Mapping for: Internal user id", with: "uid", fill_options: { clear: :backspace } |
| 72 | + fill_in "Mapping for: Username", with: "login\nmail" |
| 73 | + fill_in "Mapping for: Email", with: "mail" |
| 74 | + fill_in "Mapping for: First name", with: "myName" |
| 75 | + fill_in "Mapping for: Last name", with: "myLastName" |
| 76 | + fill_in "Mapping for: Internal user id", with: "uid" |
76 | 77 |
|
77 | 78 | click_link_or_button "Continue"
|
78 | 79 |
|
|
105 | 106 | expect(provider.mapping_lastname).to eq "myLastName"
|
106 | 107 | expect(provider.mapping_uid).to eq "uid"
|
107 | 108 | expect(provider.authn_requests_signed).to be true
|
| 109 | + expect(provider.limit_self_registration).to be true |
108 | 110 |
|
109 | 111 | click_link_or_button "Delete"
|
110 | 112 | # Confirm the deletion
|
|
175 | 177 |
|
176 | 178 | expect(page).to have_text "Display name has already been taken."
|
177 | 179 | end
|
| 180 | + |
| 181 | + it "can toggle limit_self_registration (Regression #59370)" do |
| 182 | + visit "/admin/saml/providers" |
| 183 | + click_link_or_button "My provider" |
| 184 | + |
| 185 | + page.find_test_selector("saml_provider_configuration_edit").click |
| 186 | + check "Limit self registration" |
| 187 | + click_link_or_button "Update" |
| 188 | + wait_for_network_idle |
| 189 | + |
| 190 | + provider.reload |
| 191 | + expect(provider.limit_self_registration).to be true |
| 192 | + end |
178 | 193 | end
|
179 | 194 | end
|
180 | 195 |
|
|
0 commit comments