mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Make negative Capybara matchers faster
Capybara matchers are smart enough to have these two statements
functionally equivalent:
expect(page).not_to have_xpath('a')
expect(page).to have_no_xpath('a')
But this only works if `Capybara::RSpecMatchers` module is included.
It is included automatically for specs in `spec/features`, but not for
pages objects.
Adding it speeds up tests relying on expecting something `not_to` be
present.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
module Pages
|
||||
class Page
|
||||
include Capybara::DSL
|
||||
include Capybara::RSpecMatchers
|
||||
include RSpec::Matchers
|
||||
include OpenProject::StaticRouting::UrlHelpers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user