-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix comments JS errors and delays (#6193)
* Fix comments UI functionality broken by #5662 * Ensure there are no JS errors during the comments UI tests * Lint the frontend spec helpers * Add CHANGELOG entry * Fix the meetings comments spec (static map requests HTTP 500) * Fix CHANGELOG
- Loading branch information
Showing
8 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
decidim-comments/app/assets/javascripts/decidim/comments/bundle.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
decidim-dev/lib/decidim/dev/test/rspec_support/frontend.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module FrontendHelpers | ||
# Thanks to: | ||
# https://medium.com/@coorasse/catch-javascript-errors-in-your-system-tests-89c2fe6773b1 | ||
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 | ||
end | ||
|
||
RSpec.configure do |config| | ||
config.include FrontendHelpers, type: :system | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters