Commit 680a9d88feb21fd5dd8a1c9a8e0ba34ec7ced129

Authored by Daniela Feitosa
2 parents 5f1ae765 748f7e32

Merge branch 'merge-requests/23'

(ActionItem2053)
app/views/profile_editor/_organization.rhtml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <% if @environment.enabled?('enable_organization_url_change') %> 17 <% if @environment.enabled?('enable_organization_url_change') %>
18 <script type="text/javascript"> 18 <script type="text/javascript">
19 function submit_button() { 19 function submit_button() {
20 - return $("profile_data_identifier").form.select("input.submit")[0]; 20 + return $("profile-data").select("input.submit")[0];
21 } 21 }
22 function warn_value_change() { 22 function warn_value_change() {
23 show_warning('profile-identifier-formitem', "identifier-change-confirmation"); 23 show_warning('profile-identifier-formitem', "identifier-change-confirmation");
features/edit_profile.feature
@@ -55,3 +55,41 @@ Feature: edit profile @@ -55,3 +55,41 @@ Feature: edit profile
55 And I press "Save" 55 And I press "Save"
56 Then I should not see "Birth date is invalid" 56 Then I should not see "Birth date is invalid"
57 And I should not see "Birth date is mandatory" 57 And I should not see "Birth date is mandatory"
  58 +
  59 + @selenium
  60 + Scenario: Alert about url change
  61 + Given the following community
  62 + | identifier | name | owner |
  63 + | o-rappa | O Rappa | joao |
  64 + And feature "enable_organization_url_change" is enabled on environment
  65 + When I go to O Rappa's control panel
  66 + And I follow "Community Info and settings" and wait
  67 + Then the "#identifier-change-confirmation" should not be visible
  68 + When I fill in "Address" with "banda-o-rappa"
  69 + Then the "#identifier-change-confirmation" should be visible
  70 +
  71 + @selenium
  72 + Scenario: Confirm url change
  73 + Given the following community
  74 + | identifier | name | owner |
  75 + | o-rappa | O Rappa | joao |
  76 + And feature "enable_organization_url_change" is enabled on environment
  77 + When I go to O Rappa's control panel
  78 + And I follow "Community Info and settings" and wait
  79 + When I fill in "Address" with "banda-o-rappa"
  80 + Then the "#identifier-change-confirmation" should be visible
  81 + When I follow "Yes"
  82 + Then the "#identifier-change-confirmation" should not be visible
  83 +
  84 + @selenium
  85 + Scenario: Cancel url change
  86 + Given the following community
  87 + | identifier | name | owner |
  88 + | o-rappa | O Rappa | joao |
  89 + And feature "enable_organization_url_change" is enabled on environment
  90 + When I go to O Rappa's control panel
  91 + And I follow "Community Info and settings" and wait
  92 + When I fill in "Address" with "banda-o-rappa"
  93 + Then the "#identifier-change-confirmation" should be visible
  94 + When I follow "No"
  95 + Then the "#identifier-change-confirmation" should not be visible