mooreniemi / Transbucket_Rails

:hospital: → :camera: → :thumbsup:
http://www.transbucket.com
10 stars 4 forks source link

rspec tests don't all pass #68

Closed mooreniemi closed 3 years ago

mooreniemi commented 3 years ago

Failures:

  1) commenting adds another comment on a thread
     Failure/Error: within(new_comment) do
     Capybara::ElementNotFound:
       Unable to find css "#comment-7 #new_comment"
     # /home/alex/.rvm/gems/ruby-2.3.3/gems/capybara-2.5.0/lib/capybara/node/finders.rb:43:in `block in find'
     # /home/alex/.rvm/gems/ruby-2.3.3/gems/capybara-2.5.0/lib/capybara/node/base.rb:84:in `synchronize'
     # /home/alex/.rvm/gems/ruby-2.3.3/gems/capybara-2.5.0/lib/capybara/node/finders.rb:32:in `find'
     # /home/alex/.rvm/gems/ruby-2.3.3/gems/capybara-2.5.0/lib/capybara/session.rb:698:in `block (2 levels) in <class:Session>'
     # /home/alex/.rvm/gems/ruby-2.3.3/gems/capybara-2.5.0/lib/capybara/session.rb:287:in `within'
     # /home/alex/.rvm/gems/ruby-2.3.3/gems/capybara-2.5.0/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
     # ./spec/features/comments_spec.rb:47:in `block (2 levels) in <top (required)>'

  2) pin creation with js with surgeon and procedure initialized creates a new pin with data and images
     Failure/Error: add_images(new_images, js: js)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 1 time but there were no matches
     Shared Example Group: "the pin creation process" called from ./spec/features/pin_creation_spec.rb:81
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_creation_spec.rb:28:in `pin_create'
     # ./spec/features/pin_creation_spec.rb:48:in `block (4 levels) in <top (required)>'

  3) pin creation with js with surgeon and procedure initialized creates a pin, adding a new surgeon and procedure
     Failure/Error: add_images(new_images, js: js)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 1 time but there were no matches
     Shared Example Group: "the pin creation process" called from ./spec/features/pin_creation_spec.rb:81
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_creation_spec.rb:28:in `pin_create'
     # ./spec/features/pin_creation_spec.rb:62:in `block (4 levels) in <top (required)>'

  4) pin creation with js with no surgeons or procedures returns errors upon submission
     Failure/Error: add_images(new_images, js: js)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 1 time but there were no matches
     Shared Example Group: "the pin creation process" called from ./spec/features/pin_creation_spec.rb:81
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_creation_spec.rb:28:in `pin_create'
     # ./spec/features/pin_creation_spec.rb:36:in `block (4 levels) in <top (required)>'

  5) pin updating with js updates the pin with new info and photos
     Failure/Error: add_images(new_images, js: true, offset: offset)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 2 times, found 1 match: ""
     Shared Example Group: "pin updating" called from ./spec/features/pin_update_spec.rb:94
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_update_spec.rb:91:in `updater_photos'
     # ./spec/features/pin_update_spec.rb:46:in `block (3 levels) in <top (required)>'

  6) pin updating with js with broken pin images updates the pin with new info and photos
     Failure/Error: add_images(new_images, js: true, offset: offset)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 2 times, found 1 match: ""
     Shared Example Group: "pin updating" called from ./spec/features/pin_update_spec.rb:99
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_update_spec.rb:91:in `updater_photos'
     # ./spec/features/pin_update_spec.rb:46:in `block (3 levels) in <top (required)>'

Finished in 42.9 seconds (files took 5.27 seconds to load)
121 examples, 6 failures, 4 pending

Failed examples:

rspec ./spec/features/comments_spec.rb:31 # commenting adds another comment on a thread
rspec ./spec/features/pin_creation_spec.rb[1:2:2:1] # pin creation with js with surgeon and procedure initialized creates a new pin with data and images
rspec ./spec/features/pin_creation_spec.rb[1:2:2:2] # pin creation with js with surgeon and procedure initialized creates a pin, adding a new surgeon and procedure
rspec ./spec/features/pin_creation_spec.rb[1:2:1:1] # pin creation with js with no surgeons or procedures returns errors upon submission
rspec ./spec/features/pin_update_spec.rb[1:2:2] # pin updating with js updates the pin with new info and photos
rspec ./spec/features/pin_update_spec.rb[1:2:3:2] # pin updating with js with broken pin images updates the pin with new info and photos

Randomized with seed 17396

Coverage report generated for RSpec to /home/alex/git/Transbucket_Rails/coverage. 666 / 765 LOC (87.06%) covered.
mooreniemi commented 3 years ago

I'm not putting bug label on this because AFAIK this doesn't impact users?

mooreniemi commented 3 years ago

Down to 5:


Failures:

  1) pin updating with js updates the pin with new info and photos
     Failure/Error: add_images(new_images, js: true, offset: offset)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 2 times, found 1 match: ""
     Shared Example Group: "pin updating" called from ./spec/features/pin_update_spec.rb:94
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_update_spec.rb:91:in `updater_photos'
     # ./spec/features/pin_update_spec.rb:46:in `block (3 levels) in <top (required)>'

  2) pin updating with js with broken pin images updates the pin with new info and photos
     Failure/Error: add_images(new_images, js: true, offset: offset)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 2 times, found 1 match: ""
     Shared Example Group: "pin updating" called from ./spec/features/pin_update_spec.rb:99
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_update_spec.rb:91:in `updater_photos'
     # ./spec/features/pin_update_spec.rb:46:in `block (3 levels) in <top (required)>'

  3) pin creation with js with surgeon and procedure initialized creates a new pin with data and images
     Failure/Error: add_images(new_images, js: js)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 1 time but there were no matches
     Shared Example Group: "the pin creation process" called from ./spec/features/pin_creation_spec.rb:80
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_creation_spec.rb:27:in `pin_create'
     # ./spec/features/pin_creation_spec.rb:47:in `block (4 levels) in <top (required)>'

  4) pin creation with js with surgeon and procedure initialized creates a pin, adding a new surgeon and procedure
     Failure/Error: add_images(new_images, js: js)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 1 time but there were no matches
     Shared Example Group: "the pin creation process" called from ./spec/features/pin_creation_spec.rb:80
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_creation_spec.rb:27:in `pin_create'
     # ./spec/features/pin_creation_spec.rb:61:in `block (4 levels) in <top (required)>'

  5) pin creation with js with no surgeons or procedures returns errors upon submission
     Failure/Error: add_images(new_images, js: js)
       expected to find css ".dz-image-preview img[alt]:not([alt=''])" 1 time but there were no matches
     Shared Example Group: "the pin creation process" called from ./spec/features/pin_creation_spec.rb:80
     # ./spec/support/capybara.rb:27:in `add_image_js'
     # ./spec/support/capybara.rb:9:in `block in add_images'
     # ./spec/support/capybara.rb:7:in `each'
     # ./spec/support/capybara.rb:7:in `each_with_index'
     # ./spec/support/capybara.rb:7:in `add_images'
     # ./spec/features/pin_creation_spec.rb:27:in `pin_create'
     # ./spec/features/pin_creation_spec.rb:35:in `block (4 levels) in <top (required)>'

Finished in 40.53 seconds (files took 4.73 seconds to load)
122 examples, 5 failures, 4 pending

Failed examples:

rspec ./spec/features/pin_update_spec.rb[1:2:2] # pin updating with js updates the pin with new info and photos
rspec ./spec/features/pin_update_spec.rb[1:2:3:2] # pin updating with js with broken pin images updates the pin with new info and photos
rspec ./spec/features/pin_creation_spec.rb[1:2:2:1] # pin creation with js with surgeon and procedure initialized creates a new pin with data and images
rspec ./spec/features/pin_creation_spec.rb[1:2:2:2] # pin creation with js with surgeon and procedure initialized creates a pin, adding a new surgeon and procedure
rspec ./spec/features/pin_creation_spec.rb[1:2:1:1] # pin creation with js with no surgeons or procedures returns errors upon submission

Randomized with seed 37047

Coverage report generated for RSpec to /home/alex/git/Transbucket_Rails/coverage. 667 / 766 LOC (87.08%) covered.
brrusselburg commented 3 years ago

Grabbing this!

mooreniemi commented 3 years ago

I don't have great summary of why these were failing but switching to the Chrome driver with Selenium and upgrading Capybara made them disappear. :)