module Decidim::ComponentTestHelpers
Helpers that get automatically included in component specs.
Public Instance Methods
expect_user_logged()
click to toggle source
# File lib/decidim/dev/test/rspec_support/helpers.rb, line 35 def expect_user_logged expect(page).to have_css(".topbar__user__logged") end
have_admin_callout(text)
click to toggle source
# File lib/decidim/dev/test/rspec_support/helpers.rb, line 39 def have_admin_callout(text) have_selector(".callout--full", text: text) end
stripped(text)
click to toggle source
# File lib/decidim/dev/test/rspec_support/helpers.rb, line 25 def stripped(text) text.gsub(/^<p>/, "").gsub(%r{</p>$}, "") end
within_flash_messages() { || ... }
click to toggle source
# File lib/decidim/dev/test/rspec_support/helpers.rb, line 29 def within_flash_messages within ".flash" do yield end end