Merge remote-tracking branch 'parent/main' into upstream-20240517

This commit is contained in:
KMY 2024-05-17 08:53:59 +09:00
commit 094ff9d2ee
153 changed files with 1412 additions and 631 deletions

View file

@ -26,6 +26,10 @@ Capybara.javascript_driver = :headless_chrome
RSpec.configure do |config|
config.before(:each, type: :system) do
driven_by :rack_test
end
config.before(:each, :js, type: :system) do
driven_by Capybara.javascript_driver
end
end

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.configure do |config|
config.after(:each, type: :system) do
config.after(:each, :js, type: :system) do
errors = page.driver.browser.logs.get(:browser)
if errors.present?
aggregate_failures 'javascript errrors' do

View file

@ -95,7 +95,7 @@ RSpec.configure do |config|
end
end
config.around :each, type: :system do |example|
config.around :each, :streaming, type: :system do |example|
# Streaming server needs DB access but `use_transactional_tests` rolls back
# every transaction. Disable this feature for streaming tests, and use
# DatabaseCleaner to clean the database tables between each test.
@ -125,6 +125,6 @@ RSpec.configure do |config|
end
def streaming_examples_present?
RUN_SYSTEM_SPECS
RSpec.world.filtered_examples.values.flatten.any? { |example| example.metadata[:streaming] == true }
end
end