Skip to content

Commit

Permalink
Fix failing test: ensure we wait for AJAX form to load.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Jul 13, 2012
1 parent 4ad0d2d commit da1efdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/acceptance/admin/groups_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
visit admin_groups_path
page.should have_content("Couldn't find any Groups.")
click_link 'create a new group'
wait_until { find_field('group[name]') } # wait for AJAX to load
fill_in 'group_name', :with => 'The Enterprise Bridge'
chosen_select('Mr Spock', :from => 'group_user_ids')
click_button 'Create Group'
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/admin/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
FactoryGirl.create(:group, :name => "Superheroes")
visit admin_users_path
click_link 'Create User'
wait_until { find_field('user[username]') } # wait for AJAX to load
fill_in 'user_username', :with => 'captainthunder'
fill_in 'user_email', :with => 'lightning@example.com'
fill_in 'user_first_name', :with => 'Captain'
Expand Down

0 comments on commit da1efdf

Please sign in to comment.