Skip to content

Commit

Permalink
Revert "Revert "Sleep so that javascript has time to execute. Fixes #…
Browse files Browse the repository at this point in the history
…1868""

This reverts commit f82be2f.
  • Loading branch information
jcoyne committed Apr 20, 2016
1 parent f9de08e commit 5d7581a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/features/create_work_spec.rb
Expand Up @@ -32,6 +32,7 @@
expect(page).to have_content('Please note, making something visible to the world (i.e. marking this as Public) may be viewed as publishing which could impact your ability to')
# attach_file('Upload a file', fixture_file_path('files/image.png'))
check('agreement')
sleep(1) # give it time to run javascript
puts "Required metadata: #{page.evaluate_script(%{$('#form-progress').data('save_work_control').requiredFields.areComplete})}"
puts "Required files: #{page.evaluate_script(%{$('#form-progress').data('save_work_control').uploads.hasFiles})}"
puts "Agreement : #{page.evaluate_script(%{$('#form-progress').data('save_work_control').depositAgreement.isAccepted})}"
Expand Down Expand Up @@ -67,6 +68,7 @@
expect(page).to have_content('Please note, making something visible to the world (i.e. marking this as Public) may be viewed as publishing which could impact your ability to')
select(second_user.user_key, from: 'On behalf of')
check('agreement')
sleep(1) # give it time to run javascript
puts "Required metadata: #{page.evaluate_script(%{$('#form-progress').data('save_work_control').requiredFields.areComplete})}"
puts "Required files: #{page.evaluate_script(%{$('#form-progress').data('save_work_control').uploads.hasFiles})}"
puts "Agreement : #{page.evaluate_script(%{$('#form-progress').data('save_work_control').depositAgreement.isAccepted})}"
Expand Down

0 comments on commit 5d7581a

Please sign in to comment.