From 9dcd741ffd27ae26ec75e1f403daa7a6a09fdd2c Mon Sep 17 00:00:00 2001 From: Alec Larsen Date: Mon, 5 Oct 2020 15:35:27 -0700 Subject: [PATCH] Deterministic system tests (#62) This removes rspec-retry completely and tries to make system tests completely deterministic by adding wait_for_connect and wait_for_render helpers to system tests. I think this should be enough to make all tests pass consistently, but it's probably worth retrying the pipeline a few times to be sure. * Use system Chrome/Chromium for Karma tests * Ensure all existing system tests are deterministic * Stop automatically retrying system tests --- Gemfile | 1 - Gemfile.lock | 34 ++-- gemfiles/rails_5_1.gemfile | 1 - gemfiles/rails_5_1.gemfile.lock | 3 - gemfiles/rails_5_2.gemfile | 1 - gemfiles/rails_5_2.gemfile.lock | 24 +-- gemfiles/rails_6_0.gemfile | 1 - gemfiles/rails_6_0.gemfile.lock | 124 ++++++------ gemfiles/rails_master.gemfile | 1 - gemfiles/rails_master.gemfile.lock | 39 ++-- karma.conf.js | 10 +- package.json | 1 - spec/spec_helper.rb | 10 - spec/support/system_test_helpers.rb | 55 +++-- .../app/javascript/packs/application.js | 8 +- spec/system/core_functionality_spec.rb | 26 ++- spec/system/live_validating_form_demo_spec.rb | 10 +- yarn.lock | 191 +----------------- 18 files changed, 193 insertions(+), 347 deletions(-) diff --git a/Gemfile b/Gemfile index 76023cc..336ee94 100644 --- a/Gemfile +++ b/Gemfile @@ -21,4 +21,3 @@ gem "puma" gem "webpacker" gem "sqlite3" gem "appraisal" -gem "rspec-retry" diff --git a/Gemfile.lock b/Gemfile.lock index e2d3fd2..c63c0a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,17 +108,17 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) - nio4r (2.5.3) + nio4r (2.5.4) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) parallel (1.19.2) - parser (2.7.1.4) + parser (2.7.1.5) ast (~> 2.4.1) pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - puma (4.3.6) + puma (5.0.2) nio4r (~> 2.0) rack (2.2.3) rack-proxy (0.6.5) @@ -153,13 +153,13 @@ GEM thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (12.3.3) - regexp_parser (1.7.1) + regexp_parser (1.8.1) rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) + rspec-core (3.9.3) rspec-support (~> 3.9.3) rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) @@ -175,22 +175,21 @@ GEM rspec-expectations (~> 3.9) rspec-mocks (~> 3.9) rspec-support (~> 3.9) - rspec-retry (0.6.2) - rspec-core (> 3.3) rspec-support (3.9.3) - rubocop (0.90.0) + rubocop (0.92.0) parallel (~> 1.10) - parser (>= 2.7.1.1) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.7) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 0.5.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) - parser (>= 2.7.1.4) - rubocop-performance (1.8.0) + rubocop-ast (0.7.1) + parser (>= 2.7.1.5) + rubocop-performance (1.8.1) rubocop (>= 0.87.0) + rubocop-ast (>= 0.4.0) ruby-progressbar (1.10.1) rubyzip (2.3.0) selenium-webdriver (3.142.7) @@ -210,15 +209,15 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - standard (0.6.0) - rubocop (~> 0.90) - rubocop-performance (~> 1.8.0) + standard (0.7) + rubocop (= 0.92) + rubocop-performance (= 1.8.1) thor (1.0.1) thread_safe (0.3.6) tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) - view_component (2.18.1) + view_component (2.19.1) activesupport (>= 5.0.0, < 7.0) webpacker (5.2.1) activesupport (>= 5.2) @@ -245,7 +244,6 @@ DEPENDENCIES rake (~> 12.0) rspec (~> 3.0) rspec-rails - rspec-retry selenium-webdriver simplecov (< 0.18) sqlite3 diff --git a/gemfiles/rails_5_1.gemfile b/gemfiles/rails_5_1.gemfile index 7797749..7810a8e 100644 --- a/gemfiles/rails_5_1.gemfile +++ b/gemfiles/rails_5_1.gemfile @@ -16,7 +16,6 @@ gem "puma" gem "webpacker" gem "sqlite3" gem "appraisal" -gem "rspec-retry" gem "rails", "~> 5.1.7" gem "action-cable-testing" diff --git a/gemfiles/rails_5_1.gemfile.lock b/gemfiles/rails_5_1.gemfile.lock index 7c4cc80..e2eff47 100644 --- a/gemfiles/rails_5_1.gemfile.lock +++ b/gemfiles/rails_5_1.gemfile.lock @@ -154,8 +154,6 @@ GEM rspec-expectations (~> 3.9) rspec-mocks (~> 3.9) rspec-support (~> 3.9) - rspec-retry (0.6.2) - rspec-core (> 3.3) rspec-support (3.9.3) rubocop (0.91.0) parallel (~> 1.10) @@ -224,7 +222,6 @@ DEPENDENCIES rake (~> 12.0) rspec (~> 3.0) rspec-rails - rspec-retry selenium-webdriver simplecov (< 0.18) sqlite3 diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile index f8db23d..44949bb 100644 --- a/gemfiles/rails_5_2.gemfile +++ b/gemfiles/rails_5_2.gemfile @@ -16,7 +16,6 @@ gem "puma" gem "webpacker" gem "sqlite3" gem "appraisal" -gem "rspec-retry" gem "rails", "~> 5.2" gem "action-cable-testing" diff --git a/gemfiles/rails_5_2.gemfile.lock b/gemfiles/rails_5_2.gemfile.lock index a3b22b6..76e522b 100644 --- a/gemfiles/rails_5_2.gemfile.lock +++ b/gemfiles/rails_5_2.gemfile.lock @@ -97,7 +97,7 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) - nio4r (2.5.3) + nio4r (2.5.4) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) parallel (1.19.2) @@ -107,7 +107,7 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - puma (4.3.6) + puma (5.0.0) nio4r (~> 2.0) rack (2.2.3) rack-proxy (0.6.5) @@ -140,7 +140,7 @@ GEM thor (>= 0.19.0, < 2.0) rainbow (3.0.0) rake (12.3.3) - regexp_parser (1.7.1) + regexp_parser (1.8.0) rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) @@ -162,22 +162,21 @@ GEM rspec-expectations (~> 3.9) rspec-mocks (~> 3.9) rspec-support (~> 3.9) - rspec-retry (0.6.2) - rspec-core (> 3.3) rspec-support (3.9.3) - rubocop (0.90.0) + rubocop (0.91.0) parallel (~> 1.10) parser (>= 2.7.1.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.7) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 0.4.0, < 1.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) + rubocop-ast (0.4.2) parser (>= 2.7.1.4) - rubocop-performance (1.8.0) + rubocop-performance (1.8.1) rubocop (>= 0.87.0) + rubocop-ast (>= 0.4.0) ruby-progressbar (1.10.1) rubyzip (2.3.0) selenium-webdriver (3.142.7) @@ -192,12 +191,12 @@ GEM sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - standard (0.6.0) + standard (0.6.1) rubocop (~> 0.90) rubocop-performance (~> 1.8.0) thor (1.0.1) @@ -205,7 +204,7 @@ GEM tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) - view_component (2.18.2) + view_component (2.19.1) activesupport (>= 5.0.0, < 7.0) webpacker (5.2.1) activesupport (>= 5.2) @@ -233,7 +232,6 @@ DEPENDENCIES rake (~> 12.0) rspec (~> 3.0) rspec-rails - rspec-retry selenium-webdriver simplecov (< 0.18) sqlite3 diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile index ec5f67d..a5d3463 100644 --- a/gemfiles/rails_6_0.gemfile +++ b/gemfiles/rails_6_0.gemfile @@ -16,7 +16,6 @@ gem "puma" gem "webpacker" gem "sqlite3" gem "appraisal" -gem "rspec-retry" gem "rails", "~> 6.0" gemspec path: "../" diff --git a/gemfiles/rails_6_0.gemfile.lock b/gemfiles/rails_6_0.gemfile.lock index 4327fb0..85e9fb2 100644 --- a/gemfiles/rails_6_0.gemfile.lock +++ b/gemfiles/rails_6_0.gemfile.lock @@ -9,56 +9,56 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (6.0.3.2) - actionpack (= 6.0.3.2) + actioncable (6.0.3.3) + actionpack (= 6.0.3.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.3.2) - actionpack (= 6.0.3.2) - activejob (= 6.0.3.2) - activerecord (= 6.0.3.2) - activestorage (= 6.0.3.2) - activesupport (= 6.0.3.2) + actionmailbox (6.0.3.3) + actionpack (= 6.0.3.3) + activejob (= 6.0.3.3) + activerecord (= 6.0.3.3) + activestorage (= 6.0.3.3) + activesupport (= 6.0.3.3) mail (>= 2.7.1) - actionmailer (6.0.3.2) - actionpack (= 6.0.3.2) - actionview (= 6.0.3.2) - activejob (= 6.0.3.2) + actionmailer (6.0.3.3) + actionpack (= 6.0.3.3) + actionview (= 6.0.3.3) + activejob (= 6.0.3.3) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.3.2) - actionview (= 6.0.3.2) - activesupport (= 6.0.3.2) + actionpack (6.0.3.3) + actionview (= 6.0.3.3) + activesupport (= 6.0.3.3) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.3.2) - actionpack (= 6.0.3.2) - activerecord (= 6.0.3.2) - activestorage (= 6.0.3.2) - activesupport (= 6.0.3.2) + actiontext (6.0.3.3) + actionpack (= 6.0.3.3) + activerecord (= 6.0.3.3) + activestorage (= 6.0.3.3) + activesupport (= 6.0.3.3) nokogiri (>= 1.8.5) - actionview (6.0.3.2) - activesupport (= 6.0.3.2) + actionview (6.0.3.3) + activesupport (= 6.0.3.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.0.3.2) - activesupport (= 6.0.3.2) + activejob (6.0.3.3) + activesupport (= 6.0.3.3) globalid (>= 0.3.6) - activemodel (6.0.3.2) - activesupport (= 6.0.3.2) - activerecord (6.0.3.2) - activemodel (= 6.0.3.2) - activesupport (= 6.0.3.2) - activestorage (6.0.3.2) - actionpack (= 6.0.3.2) - activejob (= 6.0.3.2) - activerecord (= 6.0.3.2) + activemodel (6.0.3.3) + activesupport (= 6.0.3.3) + activerecord (6.0.3.3) + activemodel (= 6.0.3.3) + activesupport (= 6.0.3.3) + activestorage (6.0.3.3) + actionpack (= 6.0.3.3) + activejob (= 6.0.3.3) + activerecord (= 6.0.3.3) marcel (~> 0.3.1) - activesupport (6.0.3.2) + activesupport (6.0.3.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -108,7 +108,7 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) - nio4r (2.5.3) + nio4r (2.5.4) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) parallel (1.19.2) @@ -118,42 +118,42 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - puma (4.3.6) + puma (5.0.0) nio4r (~> 2.0) rack (2.2.3) rack-proxy (0.6.5) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.3.2) - actioncable (= 6.0.3.2) - actionmailbox (= 6.0.3.2) - actionmailer (= 6.0.3.2) - actionpack (= 6.0.3.2) - actiontext (= 6.0.3.2) - actionview (= 6.0.3.2) - activejob (= 6.0.3.2) - activemodel (= 6.0.3.2) - activerecord (= 6.0.3.2) - activestorage (= 6.0.3.2) - activesupport (= 6.0.3.2) + rails (6.0.3.3) + actioncable (= 6.0.3.3) + actionmailbox (= 6.0.3.3) + actionmailer (= 6.0.3.3) + actionpack (= 6.0.3.3) + actiontext (= 6.0.3.3) + actionview (= 6.0.3.3) + activejob (= 6.0.3.3) + activemodel (= 6.0.3.3) + activerecord (= 6.0.3.3) + activestorage (= 6.0.3.3) + activesupport (= 6.0.3.3) bundler (>= 1.3.0) - railties (= 6.0.3.2) + railties (= 6.0.3.3) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.2) - actionpack (= 6.0.3.2) - activesupport (= 6.0.3.2) + railties (6.0.3.3) + actionpack (= 6.0.3.3) + activesupport (= 6.0.3.3) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (12.3.3) - regexp_parser (1.7.1) + regexp_parser (1.8.0) rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) @@ -175,22 +175,21 @@ GEM rspec-expectations (~> 3.9) rspec-mocks (~> 3.9) rspec-support (~> 3.9) - rspec-retry (0.6.2) - rspec-core (> 3.3) rspec-support (3.9.3) - rubocop (0.90.0) + rubocop (0.91.0) parallel (~> 1.10) parser (>= 2.7.1.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.7) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 0.4.0, < 1.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) + rubocop-ast (0.4.2) parser (>= 2.7.1.4) - rubocop-performance (1.8.0) + rubocop-performance (1.8.1) rubocop (>= 0.87.0) + rubocop-ast (>= 0.4.0) ruby-progressbar (1.10.1) rubyzip (2.3.0) selenium-webdriver (3.142.7) @@ -205,12 +204,12 @@ GEM sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - standard (0.6.0) + standard (0.6.1) rubocop (~> 0.90) rubocop-performance (~> 1.8.0) thor (1.0.1) @@ -218,7 +217,7 @@ GEM tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) - view_component (2.18.2) + view_component (2.19.1) activesupport (>= 5.0.0, < 7.0) webpacker (5.2.1) activesupport (>= 5.2) @@ -246,7 +245,6 @@ DEPENDENCIES rake (~> 12.0) rspec (~> 3.0) rspec-rails - rspec-retry selenium-webdriver simplecov (< 0.18) sqlite3 diff --git a/gemfiles/rails_master.gemfile b/gemfiles/rails_master.gemfile index 52258c8..a732ce5 100644 --- a/gemfiles/rails_master.gemfile +++ b/gemfiles/rails_master.gemfile @@ -16,7 +16,6 @@ gem "puma" gem "webpacker" gem "sqlite3" gem "appraisal" -gem "rspec-retry" gem "rails", git: "https://github.com/rails/rails.git", ref: "master" gemspec path: "../" diff --git a/gemfiles/rails_master.gemfile.lock b/gemfiles/rails_master.gemfile.lock index fee71c8..9196075 100644 --- a/gemfiles/rails_master.gemfile.lock +++ b/gemfiles/rails_master.gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/rails/rails.git - revision: 1b58c536ab22dd0b4c4957316bcd31262b824deb + revision: 5cfd58bbfb8425ab1931c618d98b649bab059ce6 ref: master specs: actioncable (6.1.0.alpha) @@ -55,6 +55,7 @@ GIT activerecord (= 6.1.0.alpha) activesupport (= 6.1.0.alpha) marcel (~> 0.3.1) + mimemagic (~> 0.3.2) activesupport (6.1.0.alpha) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -138,17 +139,17 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) - nio4r (2.5.3) + nio4r (2.5.4) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) parallel (1.19.2) - parser (2.7.1.4) + parser (2.7.1.5) ast (~> 2.4.1) pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - puma (4.3.6) + puma (5.0.2) nio4r (~> 2.0) rack (2.2.3) rack-proxy (0.6.5) @@ -162,13 +163,13 @@ GEM loofah (~> 2.3) rainbow (3.0.0) rake (12.3.3) - regexp_parser (1.7.1) + regexp_parser (1.8.1) rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) + rspec-core (3.9.3) rspec-support (~> 3.9.3) rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) @@ -184,22 +185,21 @@ GEM rspec-expectations (~> 3.9) rspec-mocks (~> 3.9) rspec-support (~> 3.9) - rspec-retry (0.6.2) - rspec-core (> 3.3) rspec-support (3.9.3) - rubocop (0.90.0) + rubocop (0.92.0) parallel (~> 1.10) - parser (>= 2.7.1.1) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.7) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 0.5.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) - parser (>= 2.7.1.4) - rubocop-performance (1.8.0) + rubocop-ast (0.7.1) + parser (>= 2.7.1.5) + rubocop-performance (1.8.1) rubocop (>= 0.87.0) + rubocop-ast (>= 0.4.0) ruby-progressbar (1.10.1) rubyzip (2.3.0) selenium-webdriver (3.142.7) @@ -214,19 +214,19 @@ GEM sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - standard (0.6.0) - rubocop (~> 0.90) - rubocop-performance (~> 1.8.0) + standard (0.7) + rubocop (= 0.92) + rubocop-performance (= 1.8.1) thor (1.0.1) tzinfo (2.0.2) concurrent-ruby (~> 1.0) unicode-display_width (1.7.0) - view_component (2.18.2) + view_component (2.19.1) activesupport (>= 5.0.0, < 7.0) webpacker (5.2.1) activesupport (>= 5.2) @@ -254,7 +254,6 @@ DEPENDENCIES rake (~> 12.0) rspec (~> 3.0) rspec-rails - rspec-retry selenium-webdriver simplecov (< 0.18) sqlite3 diff --git a/karma.conf.js b/karma.conf.js index 7372950..7e90765 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,7 +1,13 @@ // Karma configuration -// TODO: Use the same Chrome bin as the Ruby specs -process.env.CHROME_BIN = require('puppeteer').executablePath() +if (!process.env.CHROME_BIN) { + const which = command => require("which").sync(command, { nothrow: true }) + + process.env.CHROME_BIN = + which('google-chrome') || + which('google-chrome-stable') || + which('chromium-browser') +} module.exports = function (config) { config.set({ diff --git a/package.json b/package.json index 9c888ea..8b82059 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "karma-coverage": "^2.0.2", "karma-mocha": "^2.0.1", "mocha": "^8.0.1", - "puppeteer": "^4.0.1", "standard": "^14.3.4" }, "standard": { diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index af70e51..22b006c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,7 +16,6 @@ require_relative "support/action_cable_testing_workaround" require "rspec/rails" -require "rspec/retry" require "capybara/rspec" require "generator_spec" @@ -56,15 +55,6 @@ driven_by :headless_chrome_no_sandbox end - # Automatically retry system tests up to 3 times - config.around(:each, type: :system) do |example| - example.run_with_retry retry: 3 - end - - # Display information about tests being automatically retried - config.verbose_retry = true - config.display_try_failure_messages = true - # To avoid running every test twice on subsequent runs because of the # recursive symlink, make sure to unlink the client. config.after(:suite) do diff --git a/spec/support/system_test_helpers.rb b/spec/support/system_test_helpers.rb index cda4dc1..6500867 100644 --- a/spec/support/system_test_helpers.rb +++ b/spec/support/system_test_helpers.rb @@ -1,34 +1,61 @@ # frozen_string_literal: true -require "timeout" - module SystemTestHelpers # https://bloggie.io/@kinopyo/capybara-trigger-blur-event def blur find("body").click end - def wait_until_component_connected!(&block) - wait_until_count!("window.connectedComponentCount", &block) + # See `spec/support/test_application/app/javascript/packs/application.js`: + JS_CONNECT_COUNT = "window.connectCount" + JS_RENDER_COUNT = "window.renderCount" + + # Blocks until a new component connects (since the last call) + def wait_for_connect + wait_for_action_cable_idle + wait_for_expression_to_increase(JS_CONNECT_COUNT) end - def wait_until_component_rendered!(&block) - wait_until_count!("window.renderCount", &block) + # Blocks until a component renders (since the last call) + def wait_for_render + wait_for_action_cable_idle + wait_for_expression_to_increase(JS_RENDER_COUNT) end private - def wait_until_count!(expression) - if block_given? - target = page.evaluate_script(expression) + def wait_for_action_cable_idle + executor = ActionCable.server.worker_pool.executor - yield - else - target = 0 + block_until do + executor.send(:synchronize) do + executor.completed_task_count == executor.scheduled_task_count + end end + end + + def wait_for_expression_to_increase(expression) + last_values = (@_wait_for_expression_to_increase_state ||= Hash.new(0)) + + last_value = last_values[expression] + new_value = nil + + block_until { (new_value = page.evaluate_script(expression)) > last_value } + + last_values[expression] = new_value + end + + def block_until(max_wait_time: Capybara.default_max_wait_time) + expiration = max_wait_time && Time.now + max_wait_time + + loop do + break if yield + + raise "timeout: condition not met before expiration" if expiration&.past? - Timeout.timeout(Capybara.default_max_wait_time) do - loop until page.evaluate_script(expression) > target + # Let the scheduler know that we are in a tight loop and waiting for other + # threads/processes to make progress. + Thread.pass end end end diff --git a/spec/support/test_application/app/javascript/packs/application.js b/spec/support/test_application/app/javascript/packs/application.js index 9b790ef..6dabd37 100644 --- a/spec/support/test_application/app/javascript/packs/application.js +++ b/spec/support/test_application/app/javascript/packs/application.js @@ -9,15 +9,11 @@ createClient({ }) // Expose client state in globals for `spec/support/system_test_helpers.rb`: -window.connectedComponentCount = 0; +window.connectCount = 0; window.renderCount = 0; document.addEventListener('motion:connect', () => { - window.connectedComponentCount += 1; -}) - -document.addEventListener('motion:disconnect', () => { - window.connectedComponentCount -= 1; + window.connectCount += 1; }) document.addEventListener('motion:render', () => { diff --git a/spec/system/core_functionality_spec.rb b/spec/system/core_functionality_spec.rb index 14fb09a..7008ab3 100644 --- a/spec/system/core_functionality_spec.rb +++ b/spec/system/core_functionality_spec.rb @@ -3,37 +3,41 @@ RSpec.describe "Core Functionality", type: :system do scenario "Triggering a state change with user input causes a render" do visit(test_component_path) - wait_until_component_connected! + wait_for_connect expect(page).to have_text("The state has been changed 0 times.") click_button "change_state" + wait_for_render expect(page).to have_text("The state has been changed 1 times.") end scenario "Triggering a state change with broadcasts causes a render" do visit(test_component_path) - wait_until_component_connected! + wait_for_connect expect(page).to have_text("The state has been changed 0 times.") ActionCable.server.broadcast "change_state", "message" - wait_until_component_rendered! + wait_for_render expect(page).to have_text("The state has been changed 1 times.") end scenario "Nested state is preserved when an outer component renders" do visit(counter_component_path) - wait_until_component_connected! + wait_for_connect click_button "+" click_button "+" + wait_for_render + expect(find(".count")).to have_text("2") click_button "Build Child" + wait_for_render expect(find(".parent .count")).to have_text("2") expect(find(".child .count")).to have_text("2") @@ -46,6 +50,8 @@ click_button "-" end + wait_for_render + expect(find(".parent .count")).to have_text("3") expect(find(".child .count")).to have_text("1") @@ -53,17 +59,21 @@ click_button "Clear Child" end + wait_for_render + expect(find(".count")).to have_text("3") click_button "Build Child" + wait_for_render + expect(find(".parent .count")).to have_text("3") expect(find(".child .count")).to have_text("3") end scenario "Periodic timers run and can be removed dynamically" do visit(timer_component_path) - wait_until_component_connected! + wait_for_connect expect(page).to have_text("1") sleep 1 @@ -74,11 +84,15 @@ scenario "Callbacks can be passed to children and trigger on parents" do visit(callback_component_path) - wait_until_component_connected! + wait_for_connect expect(page).to have_text("The count is 0") + click_button "+" click_button "+" + + wait_for_render + expect(page).to have_text("The count is 2") end end diff --git a/spec/system/live_validating_form_demo_spec.rb b/spec/system/live_validating_form_demo_spec.rb index 35c54a2..21120c9 100644 --- a/spec/system/live_validating_form_demo_spec.rb +++ b/spec/system/live_validating_form_demo_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "Live Validating Form Demo", type: :system do before(:each) do visit(new_dog_path) - wait_until_component_connected! + wait_for_connect end it "works like a normal form" do @@ -15,10 +15,10 @@ it "automatically validates after user input" do Dog.create!(name: "Taken") - wait_until_component_rendered! fill_in "dog_name", with: "Taken" blur + wait_for_render expect(page).to have_text("taken") @@ -31,11 +31,12 @@ it "automatically validates when a new record is created elsewhere" do fill_in "dog_name", with: "Tibbles" blur + wait_for_render expect(page).not_to have_text("taken") Dog.create!(name: "Tibbles") - wait_until_component_rendered! + wait_for_render expect(page).to have_text("taken") end @@ -44,16 +45,19 @@ fill_in "dog_name", with: "Fido" click_button "Add Toy" + wait_for_render find('[data-identifier-for-test-suite="toy-name[0]"]').fill_in(with: "Ball") expect(page).not_to have_text("can't be blank") click_button "Add Toy" + wait_for_render find('[data-identifier-for-test-suite="toy-name[0]"]').fill_in(with: "") find('[data-identifier-for-test-suite="toy-name[1]"]').fill_in(with: "Ball") blur + wait_for_render expect(page).to have_text("can't be blank") end diff --git a/yarn.lock b/yarn.lock index ed70660..65e029b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1142,13 +1142,6 @@ dependencies: "@types/node" "*" -"@types/yauzl@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af" - integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== - dependencies: - "@types/node" "*" - "@webcomponents/shadycss@^1.9.4": version "1.10.0" resolved "https://registry.yarnpkg.com/@webcomponents/shadycss/-/shadycss-1.10.0.tgz#7a80ec1e8b271fb3f0cc02cd4358b877a303545d" @@ -1187,11 +1180,6 @@ after@0.8.2: resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" @@ -1384,11 +1372,6 @@ base64-arraybuffer@0.1.5: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - base64id@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" @@ -1413,15 +1396,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -bl@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489" - integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - blob@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" @@ -1482,24 +1456,11 @@ browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.8.5, browserslist@^4. escalade "^3.0.1" node-releases "^1.1.58" -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer@^5.2.1, buffer@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - builtin-modules@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" @@ -1630,11 +1591,6 @@ chokidar@^3.0.0: optionalDependencies: fsevents "~2.1.2" -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - clean-css@^4.2.1: version "4.2.3" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" @@ -1897,7 +1853,7 @@ debug@3.2.6, debug@^3.1.0, debug@^3.1.1: dependencies: ms "^2.1.1" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@~4.1.0: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@~4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -2067,7 +2023,7 @@ encodeurl@^1.0.2, encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -2488,17 +2444,6 @@ external-editor@^3.0.3: iconv-lite "^0.4.24" tmp "^0.0.33" -extract-zip@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" - integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - dependencies: - debug "^4.1.1" - get-stream "^5.1.0" - yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -2524,13 +2469,6 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -2644,11 +2582,6 @@ fresh@~0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -2886,14 +2819,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== - dependencies: - agent-base "5" - debug "4" - iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -2901,11 +2826,6 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -2942,7 +2862,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4: +inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3629,7 +3549,7 @@ mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.27, mime-types@~2.1.19, dependencies: mime-db "1.44.0" -mime@^2.0.3, mime@^2.4.5: +mime@^2.4.5: version "2.4.6" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== @@ -3651,16 +3571,6 @@ minimist@^1.2.3, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -mitt@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.0.1.tgz#9e8a075b4daae82dd91aac155a0ece40ca7cb393" - integrity sha512-FhuJY+tYHLnPcBHQhbUFzscD5512HumCPE4URXZUgPi3IvOJi4Xva5IIgy3xX56GqCmw++MAm5UURG6kDBYTdg== - -mkdirp-classic@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - mkdirp@^0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -4037,11 +3947,6 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -4132,7 +4037,7 @@ private@^0.1.8: resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== -progress@^2.0.0, progress@^2.0.1: +progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -4157,11 +4062,6 @@ prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -proxy-from-env@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -4185,23 +4085,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-4.0.1.tgz#ebc2ee61157ed1aa25be3843fda97807df1d51f5" - integrity sha512-LIiSWTRqpTnnm3R2yAoMBx1inSeKwVZy66RFSkgSTDINzheJZPd5z5mMbPM0FkvwWAZ27a+69j5nZf+Fpyhn3Q== - dependencies: - debug "^4.1.0" - extract-zip "^2.0.0" - https-proxy-agent "^4.0.0" - mime "^2.0.3" - mitt "^2.0.1" - progress "^2.0.1" - proxy-from-env "^1.0.0" - rimraf "^3.0.2" - tar-fs "^2.0.0" - unbzip2-stream "^1.3.3" - ws "^7.2.3" - qjobs@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" @@ -4278,15 +4161,6 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^3.1.1, readable-stream@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readdirp@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" @@ -4492,7 +4366,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -4775,13 +4649,6 @@ string.prototype.trimstart@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -4857,27 +4724,6 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -tar-fs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" - integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.0.0" - -tar-stream@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" - integrity sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== - dependencies: - bl "^4.0.1" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - terser@^4.6.7: version "4.8.0" resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" @@ -4916,7 +4762,7 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -through@^2.3.6, through@^2.3.8: +through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -5049,14 +4895,6 @@ uglify-js@^3.5.1: resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.0.tgz#397a7e6e31ce820bfd1cb55b804ee140c587a9e7" integrity sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA== -unbzip2-stream@^1.3.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -5115,11 +4953,6 @@ useragent@^2.3.0: lru-cache "4.1.x" tmp "0.0.x" -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -5260,7 +5093,7 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@^7.1.2, ws@^7.2.3: +ws@^7.1.2: version "7.3.0" resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.0.tgz#4b2f7f219b3d3737bc1a2fbf145d825b94d38ffd" integrity sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w== @@ -5382,14 +5215,6 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.1" -yauzl@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"