File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #  Copyright (c) 2012-2025, Jungwacht Blauring Schweiz. This file is part of 
2+ #  hitobito_jubla and licensed under the Affero General Public License version 3 
3+ #  or later. See the COPYING file at the top-level directory or at 
4+ #  https://github.com/hitobito/hitobito_jubla. 
5+ 
6+ require  "spec_helper" 
7+ 
8+ describe  "Globalized input fields" ,  js : true  do 
9+   let ( :group )  {  groups ( :ch )  } 
10+ 
11+   before  do 
12+     sign_in ( people ( :top_leader ) ) 
13+     visit  edit_group_path ( group ) 
14+   end 
15+ 
16+   it  "should show globalized field without translation option in single language wagon"  do 
17+     expect ( page ) . to  have_css ( "input[id^='group_privacy_policy_title']" ,  count : 1 ,  visible : false ) 
18+     expect ( page ) . not_to  have_css ( "button[data-action='globalized-fields#toggleFields']" ) 
19+ 
20+     fill_in  "group_privacy_policy_title" ,  with : "Some privacy policy title" 
21+     expect ( page ) . not_to  have_content ( "Zusätzlich ausgefüllte Sprachen" ) 
22+ 
23+     click_button ( "Speichern" ) 
24+     expect ( page ) . to  have_content ( "Gruppe #{ group . name }   wurde erfolgreich aktualisiert" ) 
25+     expect ( group . reload . privacy_policy_title_translations ) . to  eql ( { de : "Some privacy policy title" } . stringify_keys ) 
26+   end 
27+ end 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments