Module: FrontendHelpers

Defined in:
decidim-dev/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 'decidim-dev/lib/decidim/dev/test/rspec_support/frontend.rb', line 6

def expect_no_js_errors
  errors = page.driver.browser.manage.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