uninitialized constant SitePrism::AllThere::RecursionChecker::ExpectedItems (NameError)
Closed this issue · 3 comments
Hello, I saw in https://github.com/site-prism/site_prism/blob/master/features/step_definitions/page_steps.rb the using be_all_there with recursion, example:
expect(@test_site.dynamic).to be_all_there(recursion: :one)
That's amazing feature that I would like to use in my project. But unfortunately it doesn't work for me or I use it wrong.
I have a page definition file with element in section, ex:
class TeacherSignupPage < SitePrism::Page
.
.
.
section :signup_form, "form.form-signin" do
element :non_existing_element, "label", text: "Wrong text"
end
end
When I use expect(@page).to be_all_there
, I get "OK", but non_existing_element isn't on the tested page. So I try to use site_prism-all_there:
- I added to capybara.rb:
require 'site_prism/all_there'
SitePrism.configure do |config|
config.use_all_there_gem = true
end
- In my step definition I added:
expect(@page).to be_all_there(recursion: :one)
But I get error:
uninitialized constant SitePrism::AllThere::RecursionChecker::ExpectedItems (NameError)
In my Gemfile.lock:
site_prism (3.4.1)
addressable (~> 2.5)
capybara (~> 3.3)
site_prism-all_there (~> 0.3)
site_prism-all_there (0.3)
Hi there.
Unfortunately, I've not quite got to the point of activation with this. I'm aware some of the documentation hinted at how to include it, but then real world stuff got in the way for a month. It's something that "is" in the pipeline. I will try get some more time on it this week and get it released before Xmas.
Luke
If you manually re-run bundle update site_prism-all_there
it should pull down version 0.3.1
This has a small fix that may alleviate some of your issues. Please note as well that the all_there recursion capabilities do exist in the main code-base, but aren't as rigorous / tested as they are in here. So you could try those also.
Closing as fixed in v0.3.1
released on rubygems. However the functionality is still not fully operational. Stay tuned for more updates in site_prism on that.