mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-06 17:12:44 +00:00
Additional logging for flaky end-to-end tests
Some checks failed
Check formatting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
Historical data migration test / pre_job (push) Has been cancelled
Ruby Testing / build (production) (push) Has been cancelled
Ruby Testing / build (test) (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Ruby Testing / test (.ruby-version) (push) Has been cancelled
Ruby Testing / test (3.1) (push) Has been cancelled
Ruby Testing / test (3.2) (push) Has been cancelled
Ruby Testing / Libvips tests (.ruby-version) (push) Has been cancelled
Ruby Testing / Libvips tests (3.1) (push) Has been cancelled
Ruby Testing / Libvips tests (3.2) (push) Has been cancelled
Ruby Testing / End to End testing (.ruby-version) (push) Has been cancelled
Ruby Testing / End to End testing (3.1) (push) Has been cancelled
Ruby Testing / End to End testing (3.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Some checks failed
Check formatting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
Historical data migration test / pre_job (push) Has been cancelled
Ruby Testing / build (production) (push) Has been cancelled
Ruby Testing / build (test) (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Ruby Testing / test (.ruby-version) (push) Has been cancelled
Ruby Testing / test (3.1) (push) Has been cancelled
Ruby Testing / test (3.2) (push) Has been cancelled
Ruby Testing / Libvips tests (.ruby-version) (push) Has been cancelled
Ruby Testing / Libvips tests (3.1) (push) Has been cancelled
Ruby Testing / Libvips tests (3.2) (push) Has been cancelled
Ruby Testing / End to End testing (.ruby-version) (push) Has been cancelled
Ruby Testing / End to End testing (3.1) (push) Has been cancelled
Ruby Testing / End to End testing (3.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
This commit is contained in:
parent
8827cd597e
commit
b0abca0bdc
|
@ -14,6 +14,7 @@ Capybara.register_driver :headless_chrome do |app|
|
||||||
options = Selenium::WebDriver::Chrome::Options.new
|
options = Selenium::WebDriver::Chrome::Options.new
|
||||||
options.add_argument '--headless=new'
|
options.add_argument '--headless=new'
|
||||||
options.add_argument '--window-size=1680,1050'
|
options.add_argument '--window-size=1680,1050'
|
||||||
|
options.add_option('goog:loggingPrefs', { performance: 'ALL' })
|
||||||
|
|
||||||
Capybara::Selenium::Driver.new(
|
Capybara::Selenium::Driver.new(
|
||||||
app,
|
app,
|
||||||
|
|
|
@ -2,7 +2,18 @@
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
config.after(:each, :js, type: :system) do
|
config.after(:each, :js, type: :system) do
|
||||||
|
performance_logs = page.driver.browser.logs.get(:performance).map(&:message)
|
||||||
errors = page.driver.browser.logs.get(:browser)
|
errors = page.driver.browser.logs.get(:browser)
|
||||||
|
|
||||||
|
# Save performance logs to capybara directory for further inspection
|
||||||
|
if performance_logs.present? && errors.present? && errors.any? { |error| error.level == 'SEVERE' }
|
||||||
|
path = File.join(Capybara.save_path, "performance-log-#{SecureRandom.hex(10)}.json")
|
||||||
|
|
||||||
|
warn "WARN: saving performance logs to #{path}"
|
||||||
|
|
||||||
|
File.write(path, "[#{performance_logs.join(',')}]")
|
||||||
|
end
|
||||||
|
|
||||||
if errors.present?
|
if errors.present?
|
||||||
aggregate_failures 'javascript errrors' do
|
aggregate_failures 'javascript errrors' do
|
||||||
errors.each do |error|
|
errors.each do |error|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user