Module: FrontendHelpers

Defined in:
lib/decidim/dev/test/rspec_support/frontend.rb

Instance Method Summary collapse

Instance Method Details

#expect_no_js_errorsObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/decidim/dev/test/rspec_support/frontend.rb', line 6

def expect_no_js_errors
  errors = page.driver.browser.logs.get(:browser)
  return if errors.blank?

  aggregate_failures "javascript errors" do
    errors.each do |error|
      expect(error.level).not_to eq("SEVERE"), error.message
    end
  end
end