Skip to content

Commit

Permalink
Re-generate js dependencies (#608)
Browse files Browse the repository at this point in the history
* Re-generate js dependencies

* Retry system specs in CI

* Rubocop fixes
  • Loading branch information
bess authored Apr 24, 2024
1 parent 034549b commit 8bfcff2
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 63 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ group :development, :test do
gem 'pry-rails'
gem 'rspec'
gem 'rspec-rails', '~> 5.0.0'
gem "rspec-retry"
gem 'rspec-solr'
gem 'rubocop-rspec'
gem 'yard'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ GEM
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-solr (3.0.0)
rspec (~> 3.5)
rspec-collection_matchers
Expand Down Expand Up @@ -588,6 +590,7 @@ DEPENDENCIES
rsolr (>= 1.0, < 3)
rspec
rspec-rails (~> 5.0.0)
rspec-retry
rspec-solr
rubocop-rspec
sass-rails (>= 6)
Expand Down
25 changes: 25 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
require 'coveralls'
Coveralls.wear!

# Adds the ability to retry flaky tests.
# See https://github.com/NoRedInk/rspec-retry
require "rspec/retry"

# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
Expand Down Expand Up @@ -36,6 +40,27 @@
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end

### Re-trying flaky system specs
# show retry status in spec process
config.verbose_retry = true
# show exception that triggers a retry if verbose_retry is set to true
config.display_try_failure_messages = true

# Retry failed system specs 3 times, but only in CI
if ENV["CI"]
config.around :each, type: :system do |ex|
ex.run_with_retry retry: 3
end
end

# callback to be run between retries
config.retry_callback = proc do |ex|
# run some additional clean up task - can be filtered by example metadata
if ex.metadata[:js]
Capybara.reset!
end
end

# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
Expand Down
127 changes: 64 additions & 63 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8bfcff2

Please sign in to comment.