cypress-on-rails 1.12.1 → 1.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +3 -3
  3. data/.gitignore +4 -1
  4. data/CHANGELOG.md +13 -0
  5. data/README.md +91 -5
  6. data/cypress-on-rails.gemspec +1 -0
  7. data/lib/cypress-on-rails.rb +2 -2
  8. data/lib/cypress_on_rails/configuration.rb +3 -0
  9. data/lib/cypress_on_rails/middleware.rb +6 -10
  10. data/lib/cypress_on_rails/middleware_config.rb +17 -0
  11. data/lib/cypress_on_rails/railtie.rb +5 -1
  12. data/lib/cypress_on_rails/vcr_middleware.rb +73 -0
  13. data/lib/cypress_on_rails/version.rb +1 -1
  14. data/lib/generators/cypress_on_rails/install_generator.rb +18 -24
  15. data/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb +1 -0
  16. data/lib/generators/cypress_on_rails/templates/spec/cypress/app_commands/clean.rb +6 -0
  17. data/lib/generators/cypress_on_rails/templates/spec/cypress/{cypress_helper.rb → cypress_helper.rb.erb} +5 -0
  18. data/lib/generators/cypress_on_rails/templates/spec/cypress/e2e/rails_examples/using_vcr.cy.js +24 -0
  19. data/lib/generators/cypress_on_rails/templates/spec/cypress/support/{index.js → index.js.erb} +1 -0
  20. data/lib/generators/cypress_on_rails/templates/spec/cypress/support/on-rails.js +1 -1
  21. data/lib/generators/cypress_on_rails/templates/spec/cypress.config.js +9 -0
  22. data/plugin/.gitignore +1 -0
  23. data/plugin/cypress/plugins/index.js +4 -0
  24. data/plugin/package.json +31 -0
  25. data/plugin/support/index.js +37 -0
  26. data/spec/cypress_on_rails/middleware_spec.rb +3 -1
  27. data/spec/cypress_on_rails/vcr_middleware_spec.rb +119 -0
  28. data/specs_e2e/cypress.config.js +10 -0
  29. data/{spec/integrations → specs_e2e}/rails_3_2/.gitignore +1 -1
  30. data/specs_e2e/rails_3_2/.ruby_version +1 -0
  31. data/{spec/integrations → specs_e2e}/rails_3_2/Gemfile +1 -1
  32. data/{spec/integrations → specs_e2e}/rails_3_2/test.sh +8 -7
  33. data/{spec/integrations → specs_e2e}/rails_4_2/.gitignore +3 -2
  34. data/{spec/integrations → specs_e2e}/rails_4_2/Gemfile +3 -1
  35. data/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb +10 -0
  36. data/{spec/integrations → specs_e2e}/rails_4_2/app/models/post.rb +3 -1
  37. data/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb +6 -0
  38. data/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb +7 -0
  39. data/{spec/integrations → specs_e2e}/rails_4_2/config/routes.rb +5 -0
  40. data/specs_e2e/rails_4_2/package.json +10 -0
  41. data/{spec/integrations → specs_e2e}/rails_4_2/test.sh +13 -12
  42. data/{spec/integrations → specs_e2e}/rails_5_2/.gitignore +1 -1
  43. data/{spec/integrations → specs_e2e}/rails_5_2/Gemfile +1 -1
  44. data/specs_e2e/rails_5_2/app/assets/javascripts/posts.js +2 -0
  45. data/specs_e2e/rails_5_2/app/assets/stylesheets/posts.css +4 -0
  46. data/{spec/integrations → specs_e2e}/rails_5_2/test.sh +8 -7
  47. metadata +177 -171
  48. data/lib/generators/cypress_on_rails/templates/spec/cypress/fixtures/example.json +0 -5
  49. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/actions.spec.js +0 -272
  50. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/aliasing.spec.js +0 -42
  51. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/assertions.spec.js +0 -63
  52. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/connectors.spec.js +0 -55
  53. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/cookies.spec.js +0 -78
  54. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/cypress_api.spec.js +0 -211
  55. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/files.spec.js +0 -86
  56. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/local_storage.spec.js +0 -52
  57. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/location.spec.js +0 -32
  58. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/misc.spec.js +0 -68
  59. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/navigation.spec.js +0 -54
  60. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/network_requests.spec.js +0 -108
  61. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/querying.spec.js +0 -65
  62. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/spies_stubs_clocks.spec.js +0 -62
  63. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/traversal.spec.js +0 -121
  64. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/utilities.spec.js +0 -89
  65. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/viewport.spec.js +0 -59
  66. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/waiting.spec.js +0 -34
  67. data/lib/generators/cypress_on_rails/templates/spec/cypress/integration/examples/window.spec.js +0 -22
  68. data/lib/generators/cypress_on_rails/templates/spec/cypress.json +0 -4
  69. data/spec/integrations/cypress.json +0 -5
  70. data/spec/integrations/rails_5_2/log/.keep +0 -0
  71. data/spec/integrations/rails_5_2/tmp/.keep +0 -0
  72. data/spec/integrations/rails_5_2/vendor/.keep +0 -0
  73. /data/lib/generators/cypress_on_rails/templates/spec/cypress/{integration/rails_examples/advance_factory_bot_spec.js → e2e/rails_examples/advance_factory_bot.cy.js} +0 -0
  74. /data/lib/generators/cypress_on_rails/templates/spec/cypress/{integration/rails_examples/other_spec.js → e2e/rails_examples/other.cy.js} +0 -0
  75. /data/lib/generators/cypress_on_rails/templates/spec/cypress/{integration/rails_examples/using_factory_bot_spec.js → e2e/rails_examples/using_factory_bot.cy.js} +0 -0
  76. /data/lib/generators/cypress_on_rails/templates/spec/cypress/{integration/rails_examples/using_fixtures_spec.js → e2e/rails_examples/using_fixtures.cy.js} +0 -0
  77. /data/lib/generators/cypress_on_rails/templates/spec/cypress/{integration/rails_examples/using_scenarios_spec.js → e2e/rails_examples/using_scenarios.cy.js} +0 -0
  78. /data/{spec/integrations → specs_e2e}/rails_3_2/README.rdoc +0 -0
  79. /data/{spec/integrations → specs_e2e}/rails_3_2/Rakefile +0 -0
  80. /data/{spec/integrations → specs_e2e}/rails_3_2/app/assets/stylesheets/application.css +0 -0
  81. /data/{spec/integrations → specs_e2e}/rails_3_2/app/controllers/application_controller.rb +0 -0
  82. /data/{spec/integrations → specs_e2e}/rails_3_2/app/controllers/welcome_controller.rb +0 -0
  83. /data/{spec/integrations → specs_e2e}/rails_3_2/app/helpers/application_helper.rb +0 -0
  84. /data/{spec/integrations → specs_e2e}/rails_3_2/app/models/post.rb +0 -0
  85. /data/{spec/integrations → specs_e2e}/rails_3_2/app/views/layouts/application.html.erb +0 -0
  86. /data/{spec/integrations → specs_e2e}/rails_3_2/app/views/welcome/index.html.erb +0 -0
  87. /data/{spec/integrations → specs_e2e}/rails_3_2/bin/rails +0 -0
  88. /data/{spec/integrations → specs_e2e}/rails_3_2/config/application.rb +0 -0
  89. /data/{spec/integrations → specs_e2e}/rails_3_2/config/boot.rb +0 -0
  90. /data/{spec/integrations → specs_e2e}/rails_3_2/config/environment.rb +0 -0
  91. /data/{spec/integrations → specs_e2e}/rails_3_2/config/environments/development.rb +0 -0
  92. /data/{spec/integrations → specs_e2e}/rails_3_2/config/environments/production.rb +0 -0
  93. /data/{spec/integrations → specs_e2e}/rails_3_2/config/environments/test.rb +0 -0
  94. /data/{spec/integrations → specs_e2e}/rails_3_2/config/initializers/backtrace_silencers.rb +0 -0
  95. /data/{spec/integrations → specs_e2e}/rails_3_2/config/initializers/inflections.rb +0 -0
  96. /data/{spec/integrations → specs_e2e}/rails_3_2/config/initializers/mime_types.rb +0 -0
  97. /data/{spec/integrations → specs_e2e}/rails_3_2/config/initializers/secret_token.rb +0 -0
  98. /data/{spec/integrations → specs_e2e}/rails_3_2/config/initializers/session_store.rb +0 -0
  99. /data/{spec/integrations → specs_e2e}/rails_3_2/config/initializers/wrap_parameters.rb +0 -0
  100. /data/{spec/integrations → specs_e2e}/rails_3_2/config/locales/en.yml +0 -0
  101. /data/{spec/integrations → specs_e2e}/rails_3_2/config/routes.rb +0 -0
  102. /data/{spec/integrations → specs_e2e}/rails_3_2/config.ru +0 -0
  103. /data/{spec/integrations → specs_e2e}/rails_3_2/log/.keep +0 -0
  104. /data/{spec/integrations → specs_e2e}/rails_3_2/public/404.html +0 -0
  105. /data/{spec/integrations → specs_e2e}/rails_3_2/public/422.html +0 -0
  106. /data/{spec/integrations → specs_e2e}/rails_3_2/public/500.html +0 -0
  107. /data/{spec/integrations → specs_e2e}/rails_3_2/public/favicon.ico +0 -0
  108. /data/{spec/integrations → specs_e2e}/rails_3_2/public/robots.txt +0 -0
  109. /data/{spec/integrations → specs_e2e}/rails_3_2/tmp/.keep +0 -0
  110. /data/{spec/integrations → specs_e2e}/rails_3_2/vendor/.gitkeep +0 -0
  111. /data/{spec/integrations → specs_e2e}/rails_4_2/README.rdoc +0 -0
  112. /data/{spec/integrations → specs_e2e}/rails_4_2/Rakefile +0 -0
  113. /data/{spec/integrations/rails_5_2/app/assets/javascripts/posts.js → specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js} +0 -0
  114. /data/{spec/integrations/rails_5_2/app/assets/stylesheets/posts.css → specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css} +0 -0
  115. /data/{spec/integrations → specs_e2e}/rails_4_2/app/controllers/application_controller.rb +0 -0
  116. /data/{spec/integrations → specs_e2e}/rails_4_2/app/controllers/welcome_controller.rb +0 -0
  117. /data/{spec/integrations → specs_e2e}/rails_4_2/app/views/layouts/application.html.erb +0 -0
  118. /data/{spec/integrations → specs_e2e}/rails_4_2/app/views/welcome/index.html.erb +0 -0
  119. /data/{spec/integrations → specs_e2e}/rails_4_2/bin/bundle +0 -0
  120. /data/{spec/integrations → specs_e2e}/rails_4_2/bin/rails +0 -0
  121. /data/{spec/integrations → specs_e2e}/rails_4_2/bin/rake +0 -0
  122. /data/{spec/integrations → specs_e2e}/rails_4_2/bin/setup +0 -0
  123. /data/{spec/integrations → specs_e2e}/rails_4_2/config/application.rb +0 -0
  124. /data/{spec/integrations → specs_e2e}/rails_4_2/config/boot.rb +0 -0
  125. /data/{spec/integrations → specs_e2e}/rails_4_2/config/environment.rb +0 -0
  126. /data/{spec/integrations → specs_e2e}/rails_4_2/config/environments/development.rb +0 -0
  127. /data/{spec/integrations → specs_e2e}/rails_4_2/config/environments/production.rb +0 -0
  128. /data/{spec/integrations → specs_e2e}/rails_4_2/config/environments/test.rb +0 -0
  129. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/backtrace_silencers.rb +0 -0
  130. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/cookies_serializer.rb +0 -0
  131. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/filter_parameter_logging.rb +0 -0
  132. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/inflections.rb +0 -0
  133. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/mime_types.rb +0 -0
  134. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/session_store.rb +0 -0
  135. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/to_time_preserves_timezone.rb +0 -0
  136. /data/{spec/integrations → specs_e2e}/rails_4_2/config/initializers/wrap_parameters.rb +0 -0
  137. /data/{spec/integrations → specs_e2e}/rails_4_2/config/locales/en.yml +0 -0
  138. /data/{spec/integrations → specs_e2e}/rails_4_2/config/secrets.yml +0 -0
  139. /data/{spec/integrations → specs_e2e}/rails_4_2/config.ru +0 -0
  140. /data/{spec/integrations → specs_e2e}/rails_4_2/public/404.html +0 -0
  141. /data/{spec/integrations → specs_e2e}/rails_4_2/public/422.html +0 -0
  142. /data/{spec/integrations → specs_e2e}/rails_4_2/public/500.html +0 -0
  143. /data/{spec/integrations → specs_e2e}/rails_4_2/public/favicon.ico +0 -0
  144. /data/{spec/integrations → specs_e2e}/rails_4_2/public/robots.txt +0 -0
  145. /data/{spec/integrations/rails_4_2/log → specs_e2e/rails_4_2/spec}/.keep +0 -0
  146. /data/{spec/integrations/rails_4_2/spec → specs_e2e/rails_4_2/vendor}/.keep +0 -0
  147. /data/{spec/integrations → specs_e2e}/rails_5_2/README.md +0 -0
  148. /data/{spec/integrations → specs_e2e}/rails_5_2/Rakefile +0 -0
  149. /data/{spec/integrations → specs_e2e}/rails_5_2/app/assets/stylesheets/scaffold.css +0 -0
  150. /data/{spec/integrations → specs_e2e}/rails_5_2/app/controllers/application_controller.rb +0 -0
  151. /data/{spec/integrations → specs_e2e}/rails_5_2/app/controllers/posts_controller.rb +0 -0
  152. /data/{spec/integrations → specs_e2e}/rails_5_2/app/helpers/posts_helper.rb +0 -0
  153. /data/{spec/integrations → specs_e2e}/rails_5_2/app/jobs/application_job.rb +0 -0
  154. /data/{spec/integrations → specs_e2e}/rails_5_2/app/models/application_record.rb +0 -0
  155. /data/{spec/integrations → specs_e2e}/rails_5_2/app/models/post.rb +0 -0
  156. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/layouts/application.html.erb +0 -0
  157. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/posts/_form.html.erb +0 -0
  158. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/posts/edit.html.erb +0 -0
  159. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/posts/index.html.erb +0 -0
  160. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/posts/new.html.erb +0 -0
  161. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/posts/show.html.erb +0 -0
  162. /data/{spec/integrations → specs_e2e}/rails_5_2/app/views/welcome/index.html.erb +0 -0
  163. /data/{spec/integrations → specs_e2e}/rails_5_2/bin/bundle +0 -0
  164. /data/{spec/integrations → specs_e2e}/rails_5_2/bin/rails +0 -0
  165. /data/{spec/integrations → specs_e2e}/rails_5_2/bin/rake +0 -0
  166. /data/{spec/integrations → specs_e2e}/rails_5_2/bin/setup +0 -0
  167. /data/{spec/integrations → specs_e2e}/rails_5_2/bin/update +0 -0
  168. /data/{spec/integrations → specs_e2e}/rails_5_2/config/application.rb +0 -0
  169. /data/{spec/integrations → specs_e2e}/rails_5_2/config/boot.rb +0 -0
  170. /data/{spec/integrations → specs_e2e}/rails_5_2/config/credentials.yml.enc +0 -0
  171. /data/{spec/integrations → specs_e2e}/rails_5_2/config/database.yml +0 -0
  172. /data/{spec/integrations → specs_e2e}/rails_5_2/config/environment.rb +0 -0
  173. /data/{spec/integrations → specs_e2e}/rails_5_2/config/environments/development.rb +0 -0
  174. /data/{spec/integrations → specs_e2e}/rails_5_2/config/environments/production.rb +0 -0
  175. /data/{spec/integrations → specs_e2e}/rails_5_2/config/environments/test.rb +0 -0
  176. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/application_controller_renderer.rb +0 -0
  177. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/backtrace_silencers.rb +0 -0
  178. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/content_security_policy.rb +0 -0
  179. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/cookies_serializer.rb +0 -0
  180. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/filter_parameter_logging.rb +0 -0
  181. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/inflections.rb +0 -0
  182. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/mime_types.rb +0 -0
  183. /data/{spec/integrations → specs_e2e}/rails_5_2/config/initializers/wrap_parameters.rb +0 -0
  184. /data/{spec/integrations → specs_e2e}/rails_5_2/config/locales/en.yml +0 -0
  185. /data/{spec/integrations → specs_e2e}/rails_5_2/config/master.key +0 -0
  186. /data/{spec/integrations → specs_e2e}/rails_5_2/config/routes.rb +0 -0
  187. /data/{spec/integrations → specs_e2e}/rails_5_2/config.ru +0 -0
  188. /data/{spec/integrations → specs_e2e}/rails_5_2/db/migrate/20180621085832_create_posts.rb +0 -0
  189. /data/{spec/integrations → specs_e2e}/rails_5_2/public/404.html +0 -0
  190. /data/{spec/integrations → specs_e2e}/rails_5_2/public/422.html +0 -0
  191. /data/{spec/integrations → specs_e2e}/rails_5_2/public/500.html +0 -0
  192. /data/{spec/integrations → specs_e2e}/rails_5_2/public/apple-touch-icon-precomposed.png +0 -0
  193. /data/{spec/integrations → specs_e2e}/rails_5_2/public/apple-touch-icon.png +0 -0
  194. /data/{spec/integrations → specs_e2e}/rails_5_2/public/favicon.ico +0 -0
  195. /data/{spec/integrations → specs_e2e}/rails_5_2/public/robots.txt +0 -0
  196. /data/{spec/integrations → specs_e2e}/rails_5_2/test/controllers/posts_controller_test.rb +0 -0
  197. /data/{spec/integrations → specs_e2e}/rails_5_2/test/cypress_fixtures/posts.yml +0 -0
  198. /data/{spec/integrations → specs_e2e}/rails_5_2/test/fixtures/posts.yml +0 -0
  199. /data/{spec/integrations → specs_e2e}/rails_5_2/test/models/post_test.rb +0 -0
  200. /data/{spec/integrations/rails_4_2 → specs_e2e/rails_5_2}/vendor/.keep +0 -0