cypress-on-rails 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +14 -14
- data/.gitignore +2 -1
- data/CHANGELOG.md +11 -0
- data/README.md +202 -48
- data/cypress-on-rails.gemspec +1 -1
- data/docs/authentication.md +30 -0
- data/docs/factory_bot_associations.md +14 -0
- data/lib/cypress_on_rails/configuration.rb +5 -0
- data/lib/cypress_on_rails/middleware.rb +1 -0
- data/lib/cypress_on_rails/railtie.rb +10 -2
- data/lib/cypress_on_rails/simple_rails_factory.rb +0 -2
- data/lib/cypress_on_rails/vcr/insert_eject_middleware.rb +75 -0
- data/lib/cypress_on_rails/vcr/middleware_helpers.rb +51 -0
- data/lib/cypress_on_rails/vcr/use_cassette_middleware.rb +56 -0
- data/lib/cypress_on_rails/version.rb +1 -1
- data/lib/generators/cypress_on_rails/install_generator.rb +31 -29
- data/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb +9 -1
- data/lib/generators/cypress_on_rails/templates/spec/cypress/support/commands.js +22 -0
- data/lib/generators/cypress_on_rails/templates/spec/cypress/support/on-rails.js +7 -0
- data/lib/generators/cypress_on_rails/templates/spec/e2e/e2e_helper.rb.erb +0 -5
- data/spec/cypress_on_rails/configuration_spec.rb +4 -1
- data/spec/cypress_on_rails/vcr/insert_eject_middleware_spec.rb +177 -0
- data/spec/cypress_on_rails/vcr/use_cassette_middleware_spec.rb +68 -0
- data/specs_e2e/rails_6_1/.gitattributes +10 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/.gitignore +4 -0
- data/specs_e2e/rails_6_1/Gemfile +20 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/Rakefile +1 -1
- data/specs_e2e/rails_6_1/app/assets/stylesheets/application.css +15 -0
- data/specs_e2e/rails_6_1/app/jobs/application_job.rb +7 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/layouts/application.html.erb +1 -1
- data/specs_e2e/rails_6_1/bin/bundle +114 -0
- data/specs_e2e/rails_6_1/bin/rails +5 -0
- data/specs_e2e/rails_6_1/bin/rake +5 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/bin/setup +15 -4
- data/specs_e2e/rails_6_1/bin/spring +14 -0
- data/specs_e2e/rails_6_1/bin/yarn +17 -0
- data/specs_e2e/rails_6_1/config/application.rb +34 -0
- data/specs_e2e/rails_6_1/config/boot.rb +4 -0
- data/specs_e2e/rails_6_1/config/cable.yml +10 -0
- data/specs_e2e/rails_6_1/config/credentials.yml.enc +1 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/config/database.yml +7 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/config/environment.rb +1 -1
- data/specs_e2e/{rails_5_2 → rails_6_1}/config/environments/development.rb +22 -5
- data/specs_e2e/rails_6_1/config/environments/production.rb +120 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/config/environments/test.rb +24 -7
- data/specs_e2e/rails_6_1/config/initializers/backtrace_silencers.rb +8 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/config/initializers/content_security_policy.rb +5 -0
- data/specs_e2e/{rails_4_2 → rails_6_1}/config/initializers/filter_parameter_logging.rb +3 -1
- data/specs_e2e/rails_6_1/config/initializers/permissions_policy.rb +11 -0
- data/specs_e2e/{rails_3_2 → rails_6_1}/config/initializers/wrap_parameters.rb +5 -1
- data/specs_e2e/{rails_5_2 → rails_6_1}/config/locales/en.yml +1 -1
- data/specs_e2e/rails_6_1/config/master.key +1 -0
- data/specs_e2e/rails_6_1/config/puma.rb +43 -0
- data/specs_e2e/rails_6_1/config/storage.yml +34 -0
- data/specs_e2e/{rails_5_2 → rails_6_1}/config.ru +2 -1
- data/specs_e2e/{rails_5_2 → rails_6_1}/db/migrate/20180621085832_create_posts.rb +1 -1
- data/specs_e2e/rails_6_1/package.json +8 -0
- data/specs_e2e/rails_6_1/playwright-report/index.html +71 -0
- data/specs_e2e/rails_6_1/public/robots.txt +1 -0
- data/specs_e2e/rails_6_1/test-results/.last-run.json +4 -0
- data/specs_e2e/rails_6_1/test.sh +57 -0
- data/specs_e2e/rails_7_2/.gitattributes +9 -0
- data/specs_e2e/rails_7_2/.gitignore +16 -0
- data/specs_e2e/rails_7_2/.rubocop.yml +8 -0
- data/specs_e2e/rails_7_2/Gemfile +11 -0
- data/specs_e2e/{rails_4_2 → rails_7_2}/Rakefile +1 -1
- data/specs_e2e/rails_7_2/app/assets/stylesheets/application.css +15 -0
- data/specs_e2e/rails_7_2/app/controllers/application_controller.rb +4 -0
- data/specs_e2e/rails_7_2/app/controllers/posts_controller.rb +58 -0
- data/specs_e2e/rails_7_2/app/helpers/posts_helper.rb +2 -0
- data/specs_e2e/rails_7_2/app/jobs/application_job.rb +7 -0
- data/specs_e2e/rails_7_2/app/models/application_record.rb +3 -0
- data/specs_e2e/rails_7_2/app/models/post.rb +2 -0
- data/specs_e2e/rails_7_2/app/views/layouts/application.html.erb +22 -0
- data/specs_e2e/rails_7_2/app/views/posts/_form.html.erb +32 -0
- data/specs_e2e/rails_7_2/app/views/posts/edit.html.erb +6 -0
- data/specs_e2e/rails_7_2/app/views/posts/index.html.erb +31 -0
- data/specs_e2e/rails_7_2/app/views/posts/new.html.erb +5 -0
- data/specs_e2e/rails_7_2/app/views/posts/show.html.erb +19 -0
- data/specs_e2e/rails_7_2/bin/brakeman +7 -0
- data/specs_e2e/rails_7_2/bin/bundle +109 -0
- data/specs_e2e/rails_7_2/bin/importmap +4 -0
- data/specs_e2e/rails_7_2/bin/rails +4 -0
- data/specs_e2e/rails_7_2/bin/rake +4 -0
- data/specs_e2e/rails_7_2/bin/setup +37 -0
- data/specs_e2e/rails_7_2/config/application.rb +37 -0
- data/specs_e2e/rails_7_2/config/boot.rb +4 -0
- data/specs_e2e/rails_7_2/config/cable.yml +10 -0
- data/specs_e2e/rails_7_2/config/credentials.yml.enc +1 -0
- data/specs_e2e/rails_7_2/config/database.yml +32 -0
- data/specs_e2e/{rails_4_2 → rails_7_2}/config/environment.rb +1 -1
- data/specs_e2e/rails_7_2/config/environments/development.rb +54 -0
- data/specs_e2e/rails_7_2/config/environments/production.rb +105 -0
- data/specs_e2e/rails_7_2/config/environments/test.rb +45 -0
- data/specs_e2e/rails_7_2/config/importmap.rb +7 -0
- data/specs_e2e/rails_7_2/config/initializers/content_security_policy.rb +25 -0
- data/specs_e2e/rails_7_2/config/initializers/filter_parameter_logging.rb +8 -0
- data/specs_e2e/{rails_5_2 → rails_7_2}/config/initializers/inflections.rb +4 -4
- data/specs_e2e/rails_7_2/config/initializers/permissions_policy.rb +13 -0
- data/specs_e2e/rails_7_2/config/locales/en.yml +31 -0
- data/specs_e2e/rails_7_2/config/master.key +1 -0
- data/specs_e2e/rails_7_2/config/puma.rb +34 -0
- data/specs_e2e/rails_7_2/config/routes.rb +5 -0
- data/specs_e2e/rails_7_2/config/storage.yml +34 -0
- data/specs_e2e/{rails_4_2 → rails_7_2}/config.ru +3 -1
- data/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb +11 -0
- data/specs_e2e/rails_7_2/db/seeds.rb +9 -0
- data/specs_e2e/rails_7_2/db/test.sqlite3-shm +0 -0
- data/specs_e2e/rails_7_2/db/test.sqlite3-wal +0 -0
- data/specs_e2e/rails_7_2/package.json +8 -0
- data/specs_e2e/rails_7_2/playwright-report/index.html +71 -0
- data/specs_e2e/{rails_4_2 → rails_7_2}/public/404.html +6 -6
- data/specs_e2e/rails_7_2/public/406-unsupported-browser.html +66 -0
- data/specs_e2e/{rails_4_2 → rails_7_2}/public/422.html +6 -6
- data/specs_e2e/{rails_4_2 → rails_7_2}/public/500.html +6 -6
- data/specs_e2e/rails_7_2/public/icon.png +0 -0
- data/specs_e2e/rails_7_2/public/icon.svg +3 -0
- data/specs_e2e/rails_7_2/public/robots.txt +1 -0
- data/specs_e2e/rails_7_2/storage/test.sqlite3 +0 -0
- data/specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb +48 -0
- data/specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml +11 -0
- data/specs_e2e/rails_7_2/test/fixtures/posts.yml +11 -0
- data/specs_e2e/rails_7_2/test/models/post_test.rb +7 -0
- data/specs_e2e/rails_7_2/test-results/.last-run.json +4 -0
- data/specs_e2e/rails_7_2/test.sh +57 -0
- data/specs_e2e/rails_8/.gitattributes +9 -0
- data/specs_e2e/rails_8/.gitignore +16 -0
- data/specs_e2e/rails_8/.rubocop.yml +8 -0
- data/specs_e2e/rails_8/Gemfile +20 -0
- data/specs_e2e/{rails_3_2 → rails_8}/Rakefile +2 -3
- data/specs_e2e/rails_8/app/assets/stylesheets/application.css +10 -0
- data/specs_e2e/rails_8/app/controllers/application_controller.rb +4 -0
- data/specs_e2e/rails_8/app/controllers/posts_controller.rb +58 -0
- data/specs_e2e/rails_8/app/helpers/posts_helper.rb +2 -0
- data/specs_e2e/rails_8/app/jobs/application_job.rb +7 -0
- data/specs_e2e/rails_8/app/models/application_record.rb +3 -0
- data/specs_e2e/rails_8/app/models/post.rb +2 -0
- data/specs_e2e/rails_8/app/views/layouts/application.html.erb +27 -0
- data/specs_e2e/rails_8/app/views/posts/_form.html.erb +32 -0
- data/specs_e2e/rails_8/app/views/posts/edit.html.erb +6 -0
- data/specs_e2e/rails_8/app/views/posts/index.html.erb +31 -0
- data/specs_e2e/rails_8/app/views/posts/new.html.erb +5 -0
- data/specs_e2e/rails_8/app/views/posts/show.html.erb +19 -0
- data/specs_e2e/rails_8/bin/brakeman +7 -0
- data/specs_e2e/rails_8/bin/bundle +109 -0
- data/specs_e2e/rails_8/bin/dev +2 -0
- data/specs_e2e/rails_8/bin/importmap +4 -0
- data/specs_e2e/rails_8/bin/rails +4 -0
- data/specs_e2e/rails_8/bin/rake +4 -0
- data/specs_e2e/rails_8/bin/setup +34 -0
- data/specs_e2e/rails_8/bin/thrust +5 -0
- data/specs_e2e/rails_8/config/application.rb +27 -0
- data/specs_e2e/rails_8/config/boot.rb +4 -0
- data/specs_e2e/rails_8/config/cable.yml +17 -0
- data/specs_e2e/rails_8/config/cache.yml +16 -0
- data/specs_e2e/rails_8/config/credentials.yml.enc +1 -0
- data/specs_e2e/rails_8/config/database.yml +41 -0
- data/specs_e2e/rails_8/config/deploy.yml +116 -0
- data/specs_e2e/rails_8/config/environment.rb +5 -0
- data/specs_e2e/rails_8/config/environments/development.rb +57 -0
- data/specs_e2e/rails_8/config/environments/production.rb +90 -0
- data/specs_e2e/rails_8/config/environments/test.rb +45 -0
- data/specs_e2e/rails_8/config/importmap.rb +7 -0
- data/specs_e2e/rails_8/config/initializers/content_security_policy.rb +25 -0
- data/specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb +8 -0
- data/specs_e2e/rails_8/config/initializers/inflections.rb +16 -0
- data/specs_e2e/rails_8/config/locales/en.yml +31 -0
- data/specs_e2e/rails_8/config/master.key +1 -0
- data/specs_e2e/rails_8/config/puma.rb +41 -0
- data/specs_e2e/rails_8/config/queue.yml +18 -0
- data/specs_e2e/rails_8/config/recurring.yml +10 -0
- data/specs_e2e/rails_8/config/routes.rb +5 -0
- data/specs_e2e/rails_8/config/storage.yml +34 -0
- data/specs_e2e/rails_8/config.ru +6 -0
- data/specs_e2e/rails_8/db/cable_schema.rb +11 -0
- data/specs_e2e/rails_8/db/cache_schema.rb +14 -0
- data/specs_e2e/rails_8/db/migrate/20180621085832_create_posts.rb +11 -0
- data/specs_e2e/rails_8/db/queue_schema.rb +129 -0
- data/specs_e2e/rails_8/db/seeds.rb +9 -0
- data/specs_e2e/rails_8/package.json +8 -0
- data/specs_e2e/rails_8/playwright-report/index.html +71 -0
- data/specs_e2e/rails_8/public/400.html +114 -0
- data/specs_e2e/rails_8/public/404.html +114 -0
- data/specs_e2e/rails_8/public/406-unsupported-browser.html +114 -0
- data/specs_e2e/rails_8/public/422.html +114 -0
- data/specs_e2e/rails_8/public/500.html +114 -0
- data/specs_e2e/rails_8/public/icon.png +0 -0
- data/specs_e2e/rails_8/public/icon.svg +3 -0
- data/specs_e2e/rails_8/public/robots.txt +1 -0
- data/specs_e2e/rails_8/storage/test.sqlite3 +0 -0
- data/specs_e2e/rails_8/storage/test.sqlite3-shm +0 -0
- data/specs_e2e/rails_8/storage/test.sqlite3-wal +0 -0
- data/specs_e2e/rails_8/test/application_system_test_case.rb +5 -0
- data/specs_e2e/rails_8/test/controllers/posts_controller_test.rb +48 -0
- data/specs_e2e/rails_8/test/cypress_fixtures/posts.yml +11 -0
- data/specs_e2e/rails_8/test/fixtures/posts.yml +11 -0
- data/specs_e2e/rails_8/test/models/post_test.rb +7 -0
- data/specs_e2e/rails_8/test/test_helper.rb +15 -0
- data/specs_e2e/rails_8/test-results/.last-run.json +4 -0
- data/specs_e2e/{rails_5_2 → rails_8}/test.sh +17 -8
- metadata +221 -153
- data/lib/cypress_on_rails/vcr_middleware.rb +0 -73
- data/lib/generators/cypress_on_rails/update_generator.rb +0 -24
- data/spec/cypress_on_rails/vcr_middleware_spec.rb +0 -119
- data/specs_e2e/rails_3_2/.gitignore +0 -9
- data/specs_e2e/rails_3_2/.ruby_version +0 -1
- data/specs_e2e/rails_3_2/Gemfile +0 -7
- data/specs_e2e/rails_3_2/README.rdoc +0 -261
- data/specs_e2e/rails_3_2/app/assets/stylesheets/application.css +0 -13
- data/specs_e2e/rails_3_2/app/controllers/application_controller.rb +0 -3
- data/specs_e2e/rails_3_2/app/controllers/welcome_controller.rb +0 -4
- data/specs_e2e/rails_3_2/app/helpers/application_helper.rb +0 -2
- data/specs_e2e/rails_3_2/app/models/post.rb +0 -21
- data/specs_e2e/rails_3_2/app/views/layouts/application.html.erb +0 -13
- data/specs_e2e/rails_3_2/app/views/welcome/index.html.erb +0 -24
- data/specs_e2e/rails_3_2/bin/rails +0 -6
- data/specs_e2e/rails_3_2/config/application.rb +0 -68
- data/specs_e2e/rails_3_2/config/boot.rb +0 -6
- data/specs_e2e/rails_3_2/config/environment.rb +0 -5
- data/specs_e2e/rails_3_2/config/environments/development.rb +0 -31
- data/specs_e2e/rails_3_2/config/environments/production.rb +0 -64
- data/specs_e2e/rails_3_2/config/environments/test.rb +0 -35
- data/specs_e2e/rails_3_2/config/initializers/backtrace_silencers.rb +0 -7
- data/specs_e2e/rails_3_2/config/initializers/inflections.rb +0 -15
- data/specs_e2e/rails_3_2/config/initializers/mime_types.rb +0 -5
- data/specs_e2e/rails_3_2/config/initializers/secret_token.rb +0 -7
- data/specs_e2e/rails_3_2/config/initializers/session_store.rb +0 -8
- data/specs_e2e/rails_3_2/config/locales/en.yml +0 -5
- data/specs_e2e/rails_3_2/config/routes.rb +0 -60
- data/specs_e2e/rails_3_2/config.ru +0 -4
- data/specs_e2e/rails_3_2/public/404.html +0 -26
- data/specs_e2e/rails_3_2/public/422.html +0 -26
- data/specs_e2e/rails_3_2/public/500.html +0 -25
- data/specs_e2e/rails_3_2/public/robots.txt +0 -5
- data/specs_e2e/rails_3_2/test.sh +0 -43
- data/specs_e2e/rails_4_2/.gitignore +0 -11
- data/specs_e2e/rails_4_2/Gemfile +0 -11
- data/specs_e2e/rails_4_2/README.rdoc +0 -28
- data/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js +0 -2
- data/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css +0 -4
- data/specs_e2e/rails_4_2/app/controllers/application_controller.rb +0 -5
- data/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb +0 -10
- data/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb +0 -4
- data/specs_e2e/rails_4_2/app/models/post.rb +0 -23
- data/specs_e2e/rails_4_2/app/views/layouts/application.html.erb +0 -12
- data/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb +0 -6
- data/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb +0 -7
- data/specs_e2e/rails_4_2/app/views/welcome/index.html.erb +0 -24
- data/specs_e2e/rails_4_2/bin/bundle +0 -3
- data/specs_e2e/rails_4_2/bin/rails +0 -4
- data/specs_e2e/rails_4_2/bin/rake +0 -4
- data/specs_e2e/rails_4_2/bin/setup +0 -29
- data/specs_e2e/rails_4_2/config/application.rb +0 -32
- data/specs_e2e/rails_4_2/config/boot.rb +0 -3
- data/specs_e2e/rails_4_2/config/environments/development.rb +0 -25
- data/specs_e2e/rails_4_2/config/environments/production.rb +0 -64
- data/specs_e2e/rails_4_2/config/environments/test.rb +0 -42
- data/specs_e2e/rails_4_2/config/initializers/backtrace_silencers.rb +0 -7
- data/specs_e2e/rails_4_2/config/initializers/cookies_serializer.rb +0 -3
- data/specs_e2e/rails_4_2/config/initializers/session_store.rb +0 -3
- data/specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb +0 -10
- data/specs_e2e/rails_4_2/config/initializers/wrap_parameters.rb +0 -9
- data/specs_e2e/rails_4_2/config/locales/en.yml +0 -23
- data/specs_e2e/rails_4_2/config/routes.rb +0 -61
- data/specs_e2e/rails_4_2/config/secrets.yml +0 -22
- data/specs_e2e/rails_4_2/package.json +0 -10
- data/specs_e2e/rails_4_2/public/favicon.ico +0 -0
- data/specs_e2e/rails_4_2/public/robots.txt +0 -5
- data/specs_e2e/rails_4_2/test.sh +0 -44
- data/specs_e2e/rails_5_2/Gemfile +0 -15
- data/specs_e2e/rails_5_2/app/assets/javascripts/posts.js +0 -2
- data/specs_e2e/rails_5_2/app/assets/stylesheets/posts.css +0 -4
- data/specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css +0 -80
- data/specs_e2e/rails_5_2/app/jobs/application_job.rb +0 -2
- data/specs_e2e/rails_5_2/app/views/welcome/index.html.erb +0 -5
- data/specs_e2e/rails_5_2/bin/bundle +0 -3
- data/specs_e2e/rails_5_2/bin/rails +0 -4
- data/specs_e2e/rails_5_2/bin/rake +0 -4
- data/specs_e2e/rails_5_2/bin/update +0 -25
- data/specs_e2e/rails_5_2/config/application.rb +0 -33
- data/specs_e2e/rails_5_2/config/boot.rb +0 -4
- data/specs_e2e/rails_5_2/config/credentials.yml.enc +0 -1
- data/specs_e2e/rails_5_2/config/environments/production.rb +0 -68
- data/specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb +0 -7
- data/specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb +0 -4
- data/specs_e2e/rails_5_2/config/initializers/mime_types.rb +0 -4
- data/specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb +0 -9
- data/specs_e2e/rails_5_2/config/master.key +0 -1
- data/specs_e2e/rails_5_2/public/favicon.ico +0 -0
- data/specs_e2e/rails_5_2/public/robots.txt +0 -1
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/controllers/application_controller.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/controllers/posts_controller.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/helpers/posts_helper.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/models/application_record.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/models/post.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/_form.html.erb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/edit.html.erb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/index.html.erb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/new.html.erb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/show.html.erb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/config/initializers/application_controller_renderer.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/config/initializers/cookies_serializer.rb +0 -0
- /data/specs_e2e/{rails_4_2 → rails_6_1}/config/initializers/inflections.rb +0 -0
- /data/specs_e2e/{rails_4_2 → rails_6_1}/config/initializers/mime_types.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/config/routes.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/public/404.html +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/public/422.html +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/public/500.html +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/public/apple-touch-icon-precomposed.png +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/public/apple-touch-icon.png +0 -0
- /data/specs_e2e/{rails_3_2 → rails_6_1}/public/favicon.ico +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/test/controllers/posts_controller_test.rb +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/test/cypress_fixtures/posts.yml +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/test/fixtures/posts.yml +0 -0
- /data/specs_e2e/{rails_5_2 → rails_6_1}/test/models/post_test.rb +0 -0
- /data/specs_e2e/{rails_3_2/log → rails_6_1/vendor}/.keep +0 -0
- /data/specs_e2e/{rails_3_2/tmp → rails_7_2/vendor}/.keep +0 -0
- /data/specs_e2e/{rails_4_2/spec → rails_7_2/vendor/javascript}/.keep +0 -0
- /data/specs_e2e/{rails_5_2 → rails_8}/README.md +0 -0
- /data/specs_e2e/{rails_4_2/vendor → rails_8/storage}/.keep +0 -0
- /data/specs_e2e/{rails_5_2 → rails_8}/vendor/.keep +0 -0
- /data/specs_e2e/{rails_3_2/vendor/.gitkeep → rails_8/vendor/javascript/.keep} +0 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
ENV["RAILS_ENV"] ||= "test"
|
2
|
+
require_relative "../config/environment"
|
3
|
+
require "rails/test_help"
|
4
|
+
|
5
|
+
module ActiveSupport
|
6
|
+
class TestCase
|
7
|
+
# Run tests in parallel with specified workers
|
8
|
+
parallelize(workers: :number_of_processors)
|
9
|
+
|
10
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
11
|
+
fixtures :all
|
12
|
+
|
13
|
+
# Add more helper methods to be used by all tests here...
|
14
|
+
end
|
15
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
set -eo pipefail
|
3
3
|
|
4
|
-
echo '--- testing rails
|
4
|
+
echo '--- testing rails 8'
|
5
5
|
|
6
6
|
echo '-- setting environment'
|
7
7
|
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
@@ -18,31 +18,40 @@ echo '-- migration'
|
|
18
18
|
bundle exec ./bin/rails db:drop || true
|
19
19
|
bundle exec ./bin/rails db:create db:migrate
|
20
20
|
|
21
|
-
echo '-- cypress
|
22
|
-
bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test
|
21
|
+
echo '-- cypress install'
|
22
|
+
bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test --framework cypress --install_with=npm --force
|
23
23
|
rm -vf test/cypress/e2e/rails_examples/using_vcr.cy.js
|
24
24
|
|
25
25
|
echo '-- start rails server'
|
26
26
|
# make sure the server is not running
|
27
|
-
(kill -9 `cat
|
27
|
+
(kill -9 `cat ../server.pid` || true )
|
28
28
|
|
29
|
-
bundle exec ./bin/rails server -p 5017 -e test &
|
29
|
+
bundle exec ./bin/rails server -p 5017 -e test -P ../server.pid &
|
30
30
|
sleep 2 # give rails a chance to start up correctly
|
31
31
|
|
32
32
|
echo '-- cypress run'
|
33
33
|
cp -fv ../cypress.config.js test/
|
34
34
|
cd test
|
35
|
+
npx cypress install
|
35
36
|
# if [ -z $CYPRESS_RECORD_KEY ]
|
36
37
|
# then
|
37
38
|
# npx cypress run
|
38
39
|
# else
|
39
|
-
npx cypress run --record
|
40
|
+
npx cypress run # --record
|
40
41
|
# fi
|
41
42
|
|
43
|
+
echo '-- playwright install'
|
44
|
+
cd ..
|
45
|
+
bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test --framework playwright --install_with=npm --force
|
46
|
+
rm -vf test/playwright/e2e/rails_examples/using_vcr.cy.js
|
47
|
+
|
42
48
|
echo '-- playwright run'
|
49
|
+
cd test
|
43
50
|
cp -fv ../../playwright.config.js .
|
44
51
|
npx playwright install-deps
|
45
|
-
npx playwright
|
52
|
+
npx playwright install
|
53
|
+
npx playwright test test/playwright
|
54
|
+
# npx playwright show-report
|
46
55
|
|
47
56
|
echo '-- stop rails server'
|
48
|
-
kill -9 `cat
|
57
|
+
kill -9 `cat ../../server.pid` || true
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cypress-on-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miceportal team
|
8
8
|
- Grant Petersen-Speelman
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rack
|
@@ -71,16 +70,16 @@ dependencies:
|
|
71
70
|
name: factory_bot
|
72
71
|
requirement: !ruby/object:Gem::Requirement
|
73
72
|
requirements:
|
74
|
-
- - "
|
73
|
+
- - "!="
|
75
74
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
75
|
+
version: 6.4.5
|
77
76
|
type: :development
|
78
77
|
prerelease: false
|
79
78
|
version_requirements: !ruby/object:Gem::Requirement
|
80
79
|
requirements:
|
81
|
-
- - "
|
80
|
+
- - "!="
|
82
81
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
82
|
+
version: 6.4.5
|
84
83
|
- !ruby/object:Gem::Dependency
|
85
84
|
name: vcr
|
86
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,7 +126,9 @@ files:
|
|
127
126
|
- lib/cypress_on_rails/railtie.rb
|
128
127
|
- lib/cypress_on_rails/simple_rails_factory.rb
|
129
128
|
- lib/cypress_on_rails/smart_factory_wrapper.rb
|
130
|
-
- lib/cypress_on_rails/
|
129
|
+
- lib/cypress_on_rails/vcr/insert_eject_middleware.rb
|
130
|
+
- lib/cypress_on_rails/vcr/middleware_helpers.rb
|
131
|
+
- lib/cypress_on_rails/vcr/use_cassette_middleware.rb
|
131
132
|
- lib/cypress_on_rails/version.rb
|
132
133
|
- lib/generators/cypress_on_rails/install_generator.rb
|
133
134
|
- lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb
|
@@ -152,7 +153,6 @@ files:
|
|
152
153
|
- lib/generators/cypress_on_rails/templates/spec/playwright/e2e/rails_examples/using_scenarios.spec.js
|
153
154
|
- lib/generators/cypress_on_rails/templates/spec/playwright/support/index.js.erb
|
154
155
|
- lib/generators/cypress_on_rails/templates/spec/playwright/support/on-rails.js
|
155
|
-
- lib/generators/cypress_on_rails/update_generator.rb
|
156
156
|
- plugin/.gitignore
|
157
157
|
- plugin/cypress/plugins/index.js
|
158
158
|
- plugin/package.json
|
@@ -166,151 +166,220 @@ files:
|
|
166
166
|
- spec/cypress_on_rails/railtie_spec.rb
|
167
167
|
- spec/cypress_on_rails/simple_rails_factory_spec.rb
|
168
168
|
- spec/cypress_on_rails/smart_factory_wrapper_spec.rb
|
169
|
-
- spec/cypress_on_rails/
|
169
|
+
- spec/cypress_on_rails/vcr/insert_eject_middleware_spec.rb
|
170
|
+
- spec/cypress_on_rails/vcr/use_cassette_middleware_spec.rb
|
170
171
|
- spec/spec_helper.rb
|
171
172
|
- specs_e2e/cypress.config.js
|
172
173
|
- specs_e2e/playwright.config.js
|
173
|
-
- specs_e2e/
|
174
|
-
- specs_e2e/
|
175
|
-
- specs_e2e/
|
176
|
-
- specs_e2e/
|
177
|
-
- specs_e2e/
|
178
|
-
- specs_e2e/
|
179
|
-
- specs_e2e/
|
180
|
-
- specs_e2e/
|
181
|
-
- specs_e2e/
|
182
|
-
- specs_e2e/
|
183
|
-
- specs_e2e/
|
184
|
-
- specs_e2e/
|
185
|
-
- specs_e2e/
|
186
|
-
- specs_e2e/
|
187
|
-
- specs_e2e/
|
188
|
-
- specs_e2e/
|
189
|
-
- specs_e2e/
|
190
|
-
- specs_e2e/
|
191
|
-
- specs_e2e/
|
192
|
-
- specs_e2e/
|
193
|
-
- specs_e2e/
|
194
|
-
- specs_e2e/
|
195
|
-
- specs_e2e/
|
196
|
-
- specs_e2e/
|
197
|
-
- specs_e2e/
|
198
|
-
- specs_e2e/
|
199
|
-
- specs_e2e/
|
200
|
-
- specs_e2e/
|
201
|
-
- specs_e2e/
|
202
|
-
- specs_e2e/
|
203
|
-
- specs_e2e/
|
204
|
-
- specs_e2e/
|
205
|
-
- specs_e2e/
|
206
|
-
- specs_e2e/
|
207
|
-
- specs_e2e/
|
208
|
-
- specs_e2e/
|
209
|
-
- specs_e2e/
|
210
|
-
- specs_e2e/
|
211
|
-
- specs_e2e/
|
212
|
-
- specs_e2e/
|
213
|
-
- specs_e2e/
|
214
|
-
- specs_e2e/
|
215
|
-
- specs_e2e/
|
216
|
-
- specs_e2e/
|
217
|
-
- specs_e2e/
|
218
|
-
- specs_e2e/
|
219
|
-
- specs_e2e/
|
220
|
-
- specs_e2e/
|
221
|
-
- specs_e2e/
|
222
|
-
- specs_e2e/
|
223
|
-
- specs_e2e/
|
224
|
-
- specs_e2e/
|
225
|
-
- specs_e2e/
|
226
|
-
- specs_e2e/
|
227
|
-
- specs_e2e/
|
228
|
-
- specs_e2e/
|
229
|
-
- specs_e2e/
|
230
|
-
- specs_e2e/
|
231
|
-
- specs_e2e/
|
232
|
-
- specs_e2e/
|
233
|
-
- specs_e2e/
|
234
|
-
- specs_e2e/
|
235
|
-
- specs_e2e/
|
236
|
-
- specs_e2e/
|
237
|
-
- specs_e2e/
|
238
|
-
- specs_e2e/
|
239
|
-
- specs_e2e/
|
240
|
-
- specs_e2e/
|
241
|
-
- specs_e2e/
|
242
|
-
- specs_e2e/
|
243
|
-
- specs_e2e/
|
244
|
-
- specs_e2e/
|
245
|
-
- specs_e2e/
|
246
|
-
- specs_e2e/
|
247
|
-
- specs_e2e/
|
248
|
-
- specs_e2e/
|
249
|
-
- specs_e2e/
|
250
|
-
- specs_e2e/
|
251
|
-
- specs_e2e/
|
252
|
-
- specs_e2e/
|
253
|
-
- specs_e2e/
|
254
|
-
- specs_e2e/
|
255
|
-
- specs_e2e/
|
256
|
-
- specs_e2e/
|
257
|
-
- specs_e2e/
|
258
|
-
- specs_e2e/
|
259
|
-
- specs_e2e/
|
260
|
-
- specs_e2e/
|
261
|
-
- specs_e2e/
|
262
|
-
- specs_e2e/
|
263
|
-
- specs_e2e/
|
264
|
-
- specs_e2e/
|
265
|
-
- specs_e2e/
|
266
|
-
- specs_e2e/
|
267
|
-
- specs_e2e/
|
268
|
-
- specs_e2e/
|
269
|
-
- specs_e2e/
|
270
|
-
- specs_e2e/
|
271
|
-
- specs_e2e/
|
272
|
-
- specs_e2e/
|
273
|
-
- specs_e2e/
|
274
|
-
- specs_e2e/
|
275
|
-
- specs_e2e/
|
276
|
-
- specs_e2e/
|
277
|
-
- specs_e2e/
|
278
|
-
- specs_e2e/
|
279
|
-
- specs_e2e/
|
280
|
-
- specs_e2e/
|
281
|
-
- specs_e2e/
|
282
|
-
- specs_e2e/
|
283
|
-
- specs_e2e/
|
284
|
-
- specs_e2e/
|
285
|
-
- specs_e2e/
|
286
|
-
- specs_e2e/
|
287
|
-
- specs_e2e/
|
288
|
-
- specs_e2e/
|
289
|
-
- specs_e2e/
|
290
|
-
- specs_e2e/
|
291
|
-
- specs_e2e/
|
292
|
-
- specs_e2e/
|
293
|
-
- specs_e2e/
|
294
|
-
- specs_e2e/
|
295
|
-
- specs_e2e/
|
296
|
-
- specs_e2e/
|
297
|
-
- specs_e2e/
|
298
|
-
- specs_e2e/
|
299
|
-
- specs_e2e/
|
300
|
-
- specs_e2e/
|
301
|
-
- specs_e2e/
|
302
|
-
- specs_e2e/
|
303
|
-
- specs_e2e/
|
304
|
-
- specs_e2e/
|
305
|
-
- specs_e2e/
|
306
|
-
- specs_e2e/
|
307
|
-
- specs_e2e/
|
308
|
-
- specs_e2e/
|
309
|
-
- specs_e2e/
|
310
|
-
- specs_e2e/
|
311
|
-
- specs_e2e/
|
312
|
-
- specs_e2e/
|
313
|
-
- specs_e2e/
|
174
|
+
- specs_e2e/rails_6_1/.gitattributes
|
175
|
+
- specs_e2e/rails_6_1/.gitignore
|
176
|
+
- specs_e2e/rails_6_1/Gemfile
|
177
|
+
- specs_e2e/rails_6_1/Rakefile
|
178
|
+
- specs_e2e/rails_6_1/app/assets/stylesheets/application.css
|
179
|
+
- specs_e2e/rails_6_1/app/controllers/application_controller.rb
|
180
|
+
- specs_e2e/rails_6_1/app/controllers/posts_controller.rb
|
181
|
+
- specs_e2e/rails_6_1/app/helpers/posts_helper.rb
|
182
|
+
- specs_e2e/rails_6_1/app/jobs/application_job.rb
|
183
|
+
- specs_e2e/rails_6_1/app/models/application_record.rb
|
184
|
+
- specs_e2e/rails_6_1/app/models/post.rb
|
185
|
+
- specs_e2e/rails_6_1/app/views/layouts/application.html.erb
|
186
|
+
- specs_e2e/rails_6_1/app/views/posts/_form.html.erb
|
187
|
+
- specs_e2e/rails_6_1/app/views/posts/edit.html.erb
|
188
|
+
- specs_e2e/rails_6_1/app/views/posts/index.html.erb
|
189
|
+
- specs_e2e/rails_6_1/app/views/posts/new.html.erb
|
190
|
+
- specs_e2e/rails_6_1/app/views/posts/show.html.erb
|
191
|
+
- specs_e2e/rails_6_1/bin/bundle
|
192
|
+
- specs_e2e/rails_6_1/bin/rails
|
193
|
+
- specs_e2e/rails_6_1/bin/rake
|
194
|
+
- specs_e2e/rails_6_1/bin/setup
|
195
|
+
- specs_e2e/rails_6_1/bin/spring
|
196
|
+
- specs_e2e/rails_6_1/bin/yarn
|
197
|
+
- specs_e2e/rails_6_1/config.ru
|
198
|
+
- specs_e2e/rails_6_1/config/application.rb
|
199
|
+
- specs_e2e/rails_6_1/config/boot.rb
|
200
|
+
- specs_e2e/rails_6_1/config/cable.yml
|
201
|
+
- specs_e2e/rails_6_1/config/credentials.yml.enc
|
202
|
+
- specs_e2e/rails_6_1/config/database.yml
|
203
|
+
- specs_e2e/rails_6_1/config/environment.rb
|
204
|
+
- specs_e2e/rails_6_1/config/environments/development.rb
|
205
|
+
- specs_e2e/rails_6_1/config/environments/production.rb
|
206
|
+
- specs_e2e/rails_6_1/config/environments/test.rb
|
207
|
+
- specs_e2e/rails_6_1/config/initializers/application_controller_renderer.rb
|
208
|
+
- specs_e2e/rails_6_1/config/initializers/backtrace_silencers.rb
|
209
|
+
- specs_e2e/rails_6_1/config/initializers/content_security_policy.rb
|
210
|
+
- specs_e2e/rails_6_1/config/initializers/cookies_serializer.rb
|
211
|
+
- specs_e2e/rails_6_1/config/initializers/filter_parameter_logging.rb
|
212
|
+
- specs_e2e/rails_6_1/config/initializers/inflections.rb
|
213
|
+
- specs_e2e/rails_6_1/config/initializers/mime_types.rb
|
214
|
+
- specs_e2e/rails_6_1/config/initializers/permissions_policy.rb
|
215
|
+
- specs_e2e/rails_6_1/config/initializers/wrap_parameters.rb
|
216
|
+
- specs_e2e/rails_6_1/config/locales/en.yml
|
217
|
+
- specs_e2e/rails_6_1/config/master.key
|
218
|
+
- specs_e2e/rails_6_1/config/puma.rb
|
219
|
+
- specs_e2e/rails_6_1/config/routes.rb
|
220
|
+
- specs_e2e/rails_6_1/config/storage.yml
|
221
|
+
- specs_e2e/rails_6_1/db/migrate/20180621085832_create_posts.rb
|
222
|
+
- specs_e2e/rails_6_1/package.json
|
223
|
+
- specs_e2e/rails_6_1/playwright-report/index.html
|
224
|
+
- specs_e2e/rails_6_1/public/404.html
|
225
|
+
- specs_e2e/rails_6_1/public/422.html
|
226
|
+
- specs_e2e/rails_6_1/public/500.html
|
227
|
+
- specs_e2e/rails_6_1/public/apple-touch-icon-precomposed.png
|
228
|
+
- specs_e2e/rails_6_1/public/apple-touch-icon.png
|
229
|
+
- specs_e2e/rails_6_1/public/favicon.ico
|
230
|
+
- specs_e2e/rails_6_1/public/robots.txt
|
231
|
+
- specs_e2e/rails_6_1/test-results/.last-run.json
|
232
|
+
- specs_e2e/rails_6_1/test.sh
|
233
|
+
- specs_e2e/rails_6_1/test/controllers/posts_controller_test.rb
|
234
|
+
- specs_e2e/rails_6_1/test/cypress_fixtures/posts.yml
|
235
|
+
- specs_e2e/rails_6_1/test/fixtures/posts.yml
|
236
|
+
- specs_e2e/rails_6_1/test/models/post_test.rb
|
237
|
+
- specs_e2e/rails_6_1/vendor/.keep
|
238
|
+
- specs_e2e/rails_7_2/.gitattributes
|
239
|
+
- specs_e2e/rails_7_2/.gitignore
|
240
|
+
- specs_e2e/rails_7_2/.rubocop.yml
|
241
|
+
- specs_e2e/rails_7_2/Gemfile
|
242
|
+
- specs_e2e/rails_7_2/Rakefile
|
243
|
+
- specs_e2e/rails_7_2/app/assets/stylesheets/application.css
|
244
|
+
- specs_e2e/rails_7_2/app/controllers/application_controller.rb
|
245
|
+
- specs_e2e/rails_7_2/app/controllers/posts_controller.rb
|
246
|
+
- specs_e2e/rails_7_2/app/helpers/posts_helper.rb
|
247
|
+
- specs_e2e/rails_7_2/app/jobs/application_job.rb
|
248
|
+
- specs_e2e/rails_7_2/app/models/application_record.rb
|
249
|
+
- specs_e2e/rails_7_2/app/models/post.rb
|
250
|
+
- specs_e2e/rails_7_2/app/views/layouts/application.html.erb
|
251
|
+
- specs_e2e/rails_7_2/app/views/posts/_form.html.erb
|
252
|
+
- specs_e2e/rails_7_2/app/views/posts/edit.html.erb
|
253
|
+
- specs_e2e/rails_7_2/app/views/posts/index.html.erb
|
254
|
+
- specs_e2e/rails_7_2/app/views/posts/new.html.erb
|
255
|
+
- specs_e2e/rails_7_2/app/views/posts/show.html.erb
|
256
|
+
- specs_e2e/rails_7_2/bin/brakeman
|
257
|
+
- specs_e2e/rails_7_2/bin/bundle
|
258
|
+
- specs_e2e/rails_7_2/bin/importmap
|
259
|
+
- specs_e2e/rails_7_2/bin/rails
|
260
|
+
- specs_e2e/rails_7_2/bin/rake
|
261
|
+
- specs_e2e/rails_7_2/bin/setup
|
262
|
+
- specs_e2e/rails_7_2/config.ru
|
263
|
+
- specs_e2e/rails_7_2/config/application.rb
|
264
|
+
- specs_e2e/rails_7_2/config/boot.rb
|
265
|
+
- specs_e2e/rails_7_2/config/cable.yml
|
266
|
+
- specs_e2e/rails_7_2/config/credentials.yml.enc
|
267
|
+
- specs_e2e/rails_7_2/config/database.yml
|
268
|
+
- specs_e2e/rails_7_2/config/environment.rb
|
269
|
+
- specs_e2e/rails_7_2/config/environments/development.rb
|
270
|
+
- specs_e2e/rails_7_2/config/environments/production.rb
|
271
|
+
- specs_e2e/rails_7_2/config/environments/test.rb
|
272
|
+
- specs_e2e/rails_7_2/config/importmap.rb
|
273
|
+
- specs_e2e/rails_7_2/config/initializers/content_security_policy.rb
|
274
|
+
- specs_e2e/rails_7_2/config/initializers/filter_parameter_logging.rb
|
275
|
+
- specs_e2e/rails_7_2/config/initializers/inflections.rb
|
276
|
+
- specs_e2e/rails_7_2/config/initializers/permissions_policy.rb
|
277
|
+
- specs_e2e/rails_7_2/config/locales/en.yml
|
278
|
+
- specs_e2e/rails_7_2/config/master.key
|
279
|
+
- specs_e2e/rails_7_2/config/puma.rb
|
280
|
+
- specs_e2e/rails_7_2/config/routes.rb
|
281
|
+
- specs_e2e/rails_7_2/config/storage.yml
|
282
|
+
- specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb
|
283
|
+
- specs_e2e/rails_7_2/db/seeds.rb
|
284
|
+
- specs_e2e/rails_7_2/db/test.sqlite3-shm
|
285
|
+
- specs_e2e/rails_7_2/db/test.sqlite3-wal
|
286
|
+
- specs_e2e/rails_7_2/package.json
|
287
|
+
- specs_e2e/rails_7_2/playwright-report/index.html
|
288
|
+
- specs_e2e/rails_7_2/public/404.html
|
289
|
+
- specs_e2e/rails_7_2/public/406-unsupported-browser.html
|
290
|
+
- specs_e2e/rails_7_2/public/422.html
|
291
|
+
- specs_e2e/rails_7_2/public/500.html
|
292
|
+
- specs_e2e/rails_7_2/public/icon.png
|
293
|
+
- specs_e2e/rails_7_2/public/icon.svg
|
294
|
+
- specs_e2e/rails_7_2/public/robots.txt
|
295
|
+
- specs_e2e/rails_7_2/storage/test.sqlite3
|
296
|
+
- specs_e2e/rails_7_2/test-results/.last-run.json
|
297
|
+
- specs_e2e/rails_7_2/test.sh
|
298
|
+
- specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb
|
299
|
+
- specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml
|
300
|
+
- specs_e2e/rails_7_2/test/fixtures/posts.yml
|
301
|
+
- specs_e2e/rails_7_2/test/models/post_test.rb
|
302
|
+
- specs_e2e/rails_7_2/vendor/.keep
|
303
|
+
- specs_e2e/rails_7_2/vendor/javascript/.keep
|
304
|
+
- specs_e2e/rails_8/.gitattributes
|
305
|
+
- specs_e2e/rails_8/.gitignore
|
306
|
+
- specs_e2e/rails_8/.rubocop.yml
|
307
|
+
- specs_e2e/rails_8/Gemfile
|
308
|
+
- specs_e2e/rails_8/README.md
|
309
|
+
- specs_e2e/rails_8/Rakefile
|
310
|
+
- specs_e2e/rails_8/app/assets/stylesheets/application.css
|
311
|
+
- specs_e2e/rails_8/app/controllers/application_controller.rb
|
312
|
+
- specs_e2e/rails_8/app/controllers/posts_controller.rb
|
313
|
+
- specs_e2e/rails_8/app/helpers/posts_helper.rb
|
314
|
+
- specs_e2e/rails_8/app/jobs/application_job.rb
|
315
|
+
- specs_e2e/rails_8/app/models/application_record.rb
|
316
|
+
- specs_e2e/rails_8/app/models/post.rb
|
317
|
+
- specs_e2e/rails_8/app/views/layouts/application.html.erb
|
318
|
+
- specs_e2e/rails_8/app/views/posts/_form.html.erb
|
319
|
+
- specs_e2e/rails_8/app/views/posts/edit.html.erb
|
320
|
+
- specs_e2e/rails_8/app/views/posts/index.html.erb
|
321
|
+
- specs_e2e/rails_8/app/views/posts/new.html.erb
|
322
|
+
- specs_e2e/rails_8/app/views/posts/show.html.erb
|
323
|
+
- specs_e2e/rails_8/bin/brakeman
|
324
|
+
- specs_e2e/rails_8/bin/bundle
|
325
|
+
- specs_e2e/rails_8/bin/dev
|
326
|
+
- specs_e2e/rails_8/bin/importmap
|
327
|
+
- specs_e2e/rails_8/bin/rails
|
328
|
+
- specs_e2e/rails_8/bin/rake
|
329
|
+
- specs_e2e/rails_8/bin/setup
|
330
|
+
- specs_e2e/rails_8/bin/thrust
|
331
|
+
- specs_e2e/rails_8/config.ru
|
332
|
+
- specs_e2e/rails_8/config/application.rb
|
333
|
+
- specs_e2e/rails_8/config/boot.rb
|
334
|
+
- specs_e2e/rails_8/config/cable.yml
|
335
|
+
- specs_e2e/rails_8/config/cache.yml
|
336
|
+
- specs_e2e/rails_8/config/credentials.yml.enc
|
337
|
+
- specs_e2e/rails_8/config/database.yml
|
338
|
+
- specs_e2e/rails_8/config/deploy.yml
|
339
|
+
- specs_e2e/rails_8/config/environment.rb
|
340
|
+
- specs_e2e/rails_8/config/environments/development.rb
|
341
|
+
- specs_e2e/rails_8/config/environments/production.rb
|
342
|
+
- specs_e2e/rails_8/config/environments/test.rb
|
343
|
+
- specs_e2e/rails_8/config/importmap.rb
|
344
|
+
- specs_e2e/rails_8/config/initializers/content_security_policy.rb
|
345
|
+
- specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb
|
346
|
+
- specs_e2e/rails_8/config/initializers/inflections.rb
|
347
|
+
- specs_e2e/rails_8/config/locales/en.yml
|
348
|
+
- specs_e2e/rails_8/config/master.key
|
349
|
+
- specs_e2e/rails_8/config/puma.rb
|
350
|
+
- specs_e2e/rails_8/config/queue.yml
|
351
|
+
- specs_e2e/rails_8/config/recurring.yml
|
352
|
+
- specs_e2e/rails_8/config/routes.rb
|
353
|
+
- specs_e2e/rails_8/config/storage.yml
|
354
|
+
- specs_e2e/rails_8/db/cable_schema.rb
|
355
|
+
- specs_e2e/rails_8/db/cache_schema.rb
|
356
|
+
- specs_e2e/rails_8/db/migrate/20180621085832_create_posts.rb
|
357
|
+
- specs_e2e/rails_8/db/queue_schema.rb
|
358
|
+
- specs_e2e/rails_8/db/seeds.rb
|
359
|
+
- specs_e2e/rails_8/package.json
|
360
|
+
- specs_e2e/rails_8/playwright-report/index.html
|
361
|
+
- specs_e2e/rails_8/public/400.html
|
362
|
+
- specs_e2e/rails_8/public/404.html
|
363
|
+
- specs_e2e/rails_8/public/406-unsupported-browser.html
|
364
|
+
- specs_e2e/rails_8/public/422.html
|
365
|
+
- specs_e2e/rails_8/public/500.html
|
366
|
+
- specs_e2e/rails_8/public/icon.png
|
367
|
+
- specs_e2e/rails_8/public/icon.svg
|
368
|
+
- specs_e2e/rails_8/public/robots.txt
|
369
|
+
- specs_e2e/rails_8/storage/.keep
|
370
|
+
- specs_e2e/rails_8/storage/test.sqlite3
|
371
|
+
- specs_e2e/rails_8/storage/test.sqlite3-shm
|
372
|
+
- specs_e2e/rails_8/storage/test.sqlite3-wal
|
373
|
+
- specs_e2e/rails_8/test-results/.last-run.json
|
374
|
+
- specs_e2e/rails_8/test.sh
|
375
|
+
- specs_e2e/rails_8/test/application_system_test_case.rb
|
376
|
+
- specs_e2e/rails_8/test/controllers/posts_controller_test.rb
|
377
|
+
- specs_e2e/rails_8/test/cypress_fixtures/posts.yml
|
378
|
+
- specs_e2e/rails_8/test/fixtures/posts.yml
|
379
|
+
- specs_e2e/rails_8/test/models/post_test.rb
|
380
|
+
- specs_e2e/rails_8/test/test_helper.rb
|
381
|
+
- specs_e2e/rails_8/vendor/.keep
|
382
|
+
- specs_e2e/rails_8/vendor/javascript/.keep
|
314
383
|
- tmp/pids/.gitkeep
|
315
384
|
homepage: http://github.com/shakacode/cypress-on-rails
|
316
385
|
licenses: []
|
@@ -336,8 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
405
|
- !ruby/object:Gem::Version
|
337
406
|
version: '0'
|
338
407
|
requirements: []
|
339
|
-
rubygems_version: 3.
|
340
|
-
signing_key:
|
408
|
+
rubygems_version: 3.6.9
|
341
409
|
specification_version: 4
|
342
410
|
summary: Integrates cypress with rails or rack applications
|
343
411
|
test_files: []
|
@@ -1,73 +0,0 @@
|
|
1
|
-
require 'json'
|
2
|
-
require 'rack'
|
3
|
-
require 'cypress_on_rails/middleware_config'
|
4
|
-
|
5
|
-
module CypressOnRails
|
6
|
-
# Middleware to handle vcr
|
7
|
-
class VCRMiddleware
|
8
|
-
include MiddlewareConfig
|
9
|
-
|
10
|
-
def initialize(app, vcr = nil)
|
11
|
-
@app = app
|
12
|
-
@vcr = vcr
|
13
|
-
@first_call = false
|
14
|
-
end
|
15
|
-
|
16
|
-
def call(env)
|
17
|
-
request = Rack::Request.new(env)
|
18
|
-
if request.path.start_with?('/__e2e__/vcr/insert')
|
19
|
-
configuration.tagged_logged { handle_insert(request) }
|
20
|
-
elsif request.path.start_with?('/__e2e__/vcr/eject')
|
21
|
-
configuration.tagged_logged { handle_eject }
|
22
|
-
else
|
23
|
-
do_first_call unless @first_call
|
24
|
-
@app.call(env)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
def handle_insert(req)
|
31
|
-
WebMock.enable! if defined?(WebMock)
|
32
|
-
vcr.turn_on!
|
33
|
-
body = JSON.parse(req.body.read)
|
34
|
-
logger.info "vcr insert cassette: #{body}"
|
35
|
-
cassette_name = body[0]
|
36
|
-
options = (body[1] || {}).symbolize_keys
|
37
|
-
options[:record] = options[:record].to_sym if options[:record]
|
38
|
-
options[:match_requests_on] = options[:match_requests_on].map(&:to_sym) if options[:match_requests_on]
|
39
|
-
options[:serialize_with] = options[:serialize_with].to_sym if options[:serialize_with]
|
40
|
-
options[:persist_with] = options[:persist_with].to_sym if options[:persist_with]
|
41
|
-
vcr.insert_cassette(cassette_name, options)
|
42
|
-
[201, {'Content-Type' => 'application/json'}, [{'message': 'OK'}.to_json]]
|
43
|
-
rescue LoadError, ArgumentError => e
|
44
|
-
[501, {'Content-Type' => 'application/json'}, [{'message': e.message}.to_json]]
|
45
|
-
end
|
46
|
-
|
47
|
-
def handle_eject
|
48
|
-
logger.info "vcr eject cassette"
|
49
|
-
vcr.eject_cassette
|
50
|
-
do_first_call
|
51
|
-
[201, {'Content-Type' => 'application/json'}, [{'message': 'OK'}.to_json]]
|
52
|
-
rescue LoadError, ArgumentError => e
|
53
|
-
[501, {'Content-Type' => 'application/json'}, [{'message': e.message}.to_json]]
|
54
|
-
end
|
55
|
-
|
56
|
-
def vcr
|
57
|
-
return @vcr if @vcr
|
58
|
-
require 'vcr'
|
59
|
-
VCR.configure do |config|
|
60
|
-
config.cassette_library_dir = "#{configuration.install_folder}/fixtures/vcr_cassettes"
|
61
|
-
end
|
62
|
-
@vcr = VCR
|
63
|
-
end
|
64
|
-
|
65
|
-
def do_first_call
|
66
|
-
@first_call = true
|
67
|
-
vcr.turn_off!
|
68
|
-
WebMock.disable! if defined?(WebMock)
|
69
|
-
rescue LoadError
|
70
|
-
# nop
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|