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.
Files changed (323) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +14 -14
  3. data/.gitignore +2 -1
  4. data/CHANGELOG.md +11 -0
  5. data/README.md +202 -48
  6. data/cypress-on-rails.gemspec +1 -1
  7. data/docs/authentication.md +30 -0
  8. data/docs/factory_bot_associations.md +14 -0
  9. data/lib/cypress_on_rails/configuration.rb +5 -0
  10. data/lib/cypress_on_rails/middleware.rb +1 -0
  11. data/lib/cypress_on_rails/railtie.rb +10 -2
  12. data/lib/cypress_on_rails/simple_rails_factory.rb +0 -2
  13. data/lib/cypress_on_rails/vcr/insert_eject_middleware.rb +75 -0
  14. data/lib/cypress_on_rails/vcr/middleware_helpers.rb +51 -0
  15. data/lib/cypress_on_rails/vcr/use_cassette_middleware.rb +56 -0
  16. data/lib/cypress_on_rails/version.rb +1 -1
  17. data/lib/generators/cypress_on_rails/install_generator.rb +31 -29
  18. data/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb +9 -1
  19. data/lib/generators/cypress_on_rails/templates/spec/cypress/support/commands.js +22 -0
  20. data/lib/generators/cypress_on_rails/templates/spec/cypress/support/on-rails.js +7 -0
  21. data/lib/generators/cypress_on_rails/templates/spec/e2e/e2e_helper.rb.erb +0 -5
  22. data/spec/cypress_on_rails/configuration_spec.rb +4 -1
  23. data/spec/cypress_on_rails/vcr/insert_eject_middleware_spec.rb +177 -0
  24. data/spec/cypress_on_rails/vcr/use_cassette_middleware_spec.rb +68 -0
  25. data/specs_e2e/rails_6_1/.gitattributes +10 -0
  26. data/specs_e2e/{rails_5_2 → rails_6_1}/.gitignore +4 -0
  27. data/specs_e2e/rails_6_1/Gemfile +20 -0
  28. data/specs_e2e/{rails_5_2 → rails_6_1}/Rakefile +1 -1
  29. data/specs_e2e/rails_6_1/app/assets/stylesheets/application.css +15 -0
  30. data/specs_e2e/rails_6_1/app/jobs/application_job.rb +7 -0
  31. data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/layouts/application.html.erb +1 -1
  32. data/specs_e2e/rails_6_1/bin/bundle +114 -0
  33. data/specs_e2e/rails_6_1/bin/rails +5 -0
  34. data/specs_e2e/rails_6_1/bin/rake +5 -0
  35. data/specs_e2e/{rails_5_2 → rails_6_1}/bin/setup +15 -4
  36. data/specs_e2e/rails_6_1/bin/spring +14 -0
  37. data/specs_e2e/rails_6_1/bin/yarn +17 -0
  38. data/specs_e2e/rails_6_1/config/application.rb +34 -0
  39. data/specs_e2e/rails_6_1/config/boot.rb +4 -0
  40. data/specs_e2e/rails_6_1/config/cable.yml +10 -0
  41. data/specs_e2e/rails_6_1/config/credentials.yml.enc +1 -0
  42. data/specs_e2e/{rails_5_2 → rails_6_1}/config/database.yml +7 -0
  43. data/specs_e2e/{rails_5_2 → rails_6_1}/config/environment.rb +1 -1
  44. data/specs_e2e/{rails_5_2 → rails_6_1}/config/environments/development.rb +22 -5
  45. data/specs_e2e/rails_6_1/config/environments/production.rb +120 -0
  46. data/specs_e2e/{rails_5_2 → rails_6_1}/config/environments/test.rb +24 -7
  47. data/specs_e2e/rails_6_1/config/initializers/backtrace_silencers.rb +8 -0
  48. data/specs_e2e/{rails_5_2 → rails_6_1}/config/initializers/content_security_policy.rb +5 -0
  49. data/specs_e2e/{rails_4_2 → rails_6_1}/config/initializers/filter_parameter_logging.rb +3 -1
  50. data/specs_e2e/rails_6_1/config/initializers/permissions_policy.rb +11 -0
  51. data/specs_e2e/{rails_3_2 → rails_6_1}/config/initializers/wrap_parameters.rb +5 -1
  52. data/specs_e2e/{rails_5_2 → rails_6_1}/config/locales/en.yml +1 -1
  53. data/specs_e2e/rails_6_1/config/master.key +1 -0
  54. data/specs_e2e/rails_6_1/config/puma.rb +43 -0
  55. data/specs_e2e/rails_6_1/config/storage.yml +34 -0
  56. data/specs_e2e/{rails_5_2 → rails_6_1}/config.ru +2 -1
  57. data/specs_e2e/{rails_5_2 → rails_6_1}/db/migrate/20180621085832_create_posts.rb +1 -1
  58. data/specs_e2e/rails_6_1/package.json +8 -0
  59. data/specs_e2e/rails_6_1/playwright-report/index.html +71 -0
  60. data/specs_e2e/rails_6_1/public/robots.txt +1 -0
  61. data/specs_e2e/rails_6_1/test-results/.last-run.json +4 -0
  62. data/specs_e2e/rails_6_1/test.sh +57 -0
  63. data/specs_e2e/rails_7_2/.gitattributes +9 -0
  64. data/specs_e2e/rails_7_2/.gitignore +16 -0
  65. data/specs_e2e/rails_7_2/.rubocop.yml +8 -0
  66. data/specs_e2e/rails_7_2/Gemfile +11 -0
  67. data/specs_e2e/{rails_4_2 → rails_7_2}/Rakefile +1 -1
  68. data/specs_e2e/rails_7_2/app/assets/stylesheets/application.css +15 -0
  69. data/specs_e2e/rails_7_2/app/controllers/application_controller.rb +4 -0
  70. data/specs_e2e/rails_7_2/app/controllers/posts_controller.rb +58 -0
  71. data/specs_e2e/rails_7_2/app/helpers/posts_helper.rb +2 -0
  72. data/specs_e2e/rails_7_2/app/jobs/application_job.rb +7 -0
  73. data/specs_e2e/rails_7_2/app/models/application_record.rb +3 -0
  74. data/specs_e2e/rails_7_2/app/models/post.rb +2 -0
  75. data/specs_e2e/rails_7_2/app/views/layouts/application.html.erb +22 -0
  76. data/specs_e2e/rails_7_2/app/views/posts/_form.html.erb +32 -0
  77. data/specs_e2e/rails_7_2/app/views/posts/edit.html.erb +6 -0
  78. data/specs_e2e/rails_7_2/app/views/posts/index.html.erb +31 -0
  79. data/specs_e2e/rails_7_2/app/views/posts/new.html.erb +5 -0
  80. data/specs_e2e/rails_7_2/app/views/posts/show.html.erb +19 -0
  81. data/specs_e2e/rails_7_2/bin/brakeman +7 -0
  82. data/specs_e2e/rails_7_2/bin/bundle +109 -0
  83. data/specs_e2e/rails_7_2/bin/importmap +4 -0
  84. data/specs_e2e/rails_7_2/bin/rails +4 -0
  85. data/specs_e2e/rails_7_2/bin/rake +4 -0
  86. data/specs_e2e/rails_7_2/bin/setup +37 -0
  87. data/specs_e2e/rails_7_2/config/application.rb +37 -0
  88. data/specs_e2e/rails_7_2/config/boot.rb +4 -0
  89. data/specs_e2e/rails_7_2/config/cable.yml +10 -0
  90. data/specs_e2e/rails_7_2/config/credentials.yml.enc +1 -0
  91. data/specs_e2e/rails_7_2/config/database.yml +32 -0
  92. data/specs_e2e/{rails_4_2 → rails_7_2}/config/environment.rb +1 -1
  93. data/specs_e2e/rails_7_2/config/environments/development.rb +54 -0
  94. data/specs_e2e/rails_7_2/config/environments/production.rb +105 -0
  95. data/specs_e2e/rails_7_2/config/environments/test.rb +45 -0
  96. data/specs_e2e/rails_7_2/config/importmap.rb +7 -0
  97. data/specs_e2e/rails_7_2/config/initializers/content_security_policy.rb +25 -0
  98. data/specs_e2e/rails_7_2/config/initializers/filter_parameter_logging.rb +8 -0
  99. data/specs_e2e/{rails_5_2 → rails_7_2}/config/initializers/inflections.rb +4 -4
  100. data/specs_e2e/rails_7_2/config/initializers/permissions_policy.rb +13 -0
  101. data/specs_e2e/rails_7_2/config/locales/en.yml +31 -0
  102. data/specs_e2e/rails_7_2/config/master.key +1 -0
  103. data/specs_e2e/rails_7_2/config/puma.rb +34 -0
  104. data/specs_e2e/rails_7_2/config/routes.rb +5 -0
  105. data/specs_e2e/rails_7_2/config/storage.yml +34 -0
  106. data/specs_e2e/{rails_4_2 → rails_7_2}/config.ru +3 -1
  107. data/specs_e2e/rails_7_2/db/migrate/20180621085832_create_posts.rb +11 -0
  108. data/specs_e2e/rails_7_2/db/seeds.rb +9 -0
  109. data/specs_e2e/rails_7_2/db/test.sqlite3-shm +0 -0
  110. data/specs_e2e/rails_7_2/db/test.sqlite3-wal +0 -0
  111. data/specs_e2e/rails_7_2/package.json +8 -0
  112. data/specs_e2e/rails_7_2/playwright-report/index.html +71 -0
  113. data/specs_e2e/{rails_4_2 → rails_7_2}/public/404.html +6 -6
  114. data/specs_e2e/rails_7_2/public/406-unsupported-browser.html +66 -0
  115. data/specs_e2e/{rails_4_2 → rails_7_2}/public/422.html +6 -6
  116. data/specs_e2e/{rails_4_2 → rails_7_2}/public/500.html +6 -6
  117. data/specs_e2e/rails_7_2/public/icon.png +0 -0
  118. data/specs_e2e/rails_7_2/public/icon.svg +3 -0
  119. data/specs_e2e/rails_7_2/public/robots.txt +1 -0
  120. data/specs_e2e/rails_7_2/storage/test.sqlite3 +0 -0
  121. data/specs_e2e/rails_7_2/test/controllers/posts_controller_test.rb +48 -0
  122. data/specs_e2e/rails_7_2/test/cypress_fixtures/posts.yml +11 -0
  123. data/specs_e2e/rails_7_2/test/fixtures/posts.yml +11 -0
  124. data/specs_e2e/rails_7_2/test/models/post_test.rb +7 -0
  125. data/specs_e2e/rails_7_2/test-results/.last-run.json +4 -0
  126. data/specs_e2e/rails_7_2/test.sh +57 -0
  127. data/specs_e2e/rails_8/.gitattributes +9 -0
  128. data/specs_e2e/rails_8/.gitignore +16 -0
  129. data/specs_e2e/rails_8/.rubocop.yml +8 -0
  130. data/specs_e2e/rails_8/Gemfile +20 -0
  131. data/specs_e2e/{rails_3_2 → rails_8}/Rakefile +2 -3
  132. data/specs_e2e/rails_8/app/assets/stylesheets/application.css +10 -0
  133. data/specs_e2e/rails_8/app/controllers/application_controller.rb +4 -0
  134. data/specs_e2e/rails_8/app/controllers/posts_controller.rb +58 -0
  135. data/specs_e2e/rails_8/app/helpers/posts_helper.rb +2 -0
  136. data/specs_e2e/rails_8/app/jobs/application_job.rb +7 -0
  137. data/specs_e2e/rails_8/app/models/application_record.rb +3 -0
  138. data/specs_e2e/rails_8/app/models/post.rb +2 -0
  139. data/specs_e2e/rails_8/app/views/layouts/application.html.erb +27 -0
  140. data/specs_e2e/rails_8/app/views/posts/_form.html.erb +32 -0
  141. data/specs_e2e/rails_8/app/views/posts/edit.html.erb +6 -0
  142. data/specs_e2e/rails_8/app/views/posts/index.html.erb +31 -0
  143. data/specs_e2e/rails_8/app/views/posts/new.html.erb +5 -0
  144. data/specs_e2e/rails_8/app/views/posts/show.html.erb +19 -0
  145. data/specs_e2e/rails_8/bin/brakeman +7 -0
  146. data/specs_e2e/rails_8/bin/bundle +109 -0
  147. data/specs_e2e/rails_8/bin/dev +2 -0
  148. data/specs_e2e/rails_8/bin/importmap +4 -0
  149. data/specs_e2e/rails_8/bin/rails +4 -0
  150. data/specs_e2e/rails_8/bin/rake +4 -0
  151. data/specs_e2e/rails_8/bin/setup +34 -0
  152. data/specs_e2e/rails_8/bin/thrust +5 -0
  153. data/specs_e2e/rails_8/config/application.rb +27 -0
  154. data/specs_e2e/rails_8/config/boot.rb +4 -0
  155. data/specs_e2e/rails_8/config/cable.yml +17 -0
  156. data/specs_e2e/rails_8/config/cache.yml +16 -0
  157. data/specs_e2e/rails_8/config/credentials.yml.enc +1 -0
  158. data/specs_e2e/rails_8/config/database.yml +41 -0
  159. data/specs_e2e/rails_8/config/deploy.yml +116 -0
  160. data/specs_e2e/rails_8/config/environment.rb +5 -0
  161. data/specs_e2e/rails_8/config/environments/development.rb +57 -0
  162. data/specs_e2e/rails_8/config/environments/production.rb +90 -0
  163. data/specs_e2e/rails_8/config/environments/test.rb +45 -0
  164. data/specs_e2e/rails_8/config/importmap.rb +7 -0
  165. data/specs_e2e/rails_8/config/initializers/content_security_policy.rb +25 -0
  166. data/specs_e2e/rails_8/config/initializers/filter_parameter_logging.rb +8 -0
  167. data/specs_e2e/rails_8/config/initializers/inflections.rb +16 -0
  168. data/specs_e2e/rails_8/config/locales/en.yml +31 -0
  169. data/specs_e2e/rails_8/config/master.key +1 -0
  170. data/specs_e2e/rails_8/config/puma.rb +41 -0
  171. data/specs_e2e/rails_8/config/queue.yml +18 -0
  172. data/specs_e2e/rails_8/config/recurring.yml +10 -0
  173. data/specs_e2e/rails_8/config/routes.rb +5 -0
  174. data/specs_e2e/rails_8/config/storage.yml +34 -0
  175. data/specs_e2e/rails_8/config.ru +6 -0
  176. data/specs_e2e/rails_8/db/cable_schema.rb +11 -0
  177. data/specs_e2e/rails_8/db/cache_schema.rb +14 -0
  178. data/specs_e2e/rails_8/db/migrate/20180621085832_create_posts.rb +11 -0
  179. data/specs_e2e/rails_8/db/queue_schema.rb +129 -0
  180. data/specs_e2e/rails_8/db/seeds.rb +9 -0
  181. data/specs_e2e/rails_8/package.json +8 -0
  182. data/specs_e2e/rails_8/playwright-report/index.html +71 -0
  183. data/specs_e2e/rails_8/public/400.html +114 -0
  184. data/specs_e2e/rails_8/public/404.html +114 -0
  185. data/specs_e2e/rails_8/public/406-unsupported-browser.html +114 -0
  186. data/specs_e2e/rails_8/public/422.html +114 -0
  187. data/specs_e2e/rails_8/public/500.html +114 -0
  188. data/specs_e2e/rails_8/public/icon.png +0 -0
  189. data/specs_e2e/rails_8/public/icon.svg +3 -0
  190. data/specs_e2e/rails_8/public/robots.txt +1 -0
  191. data/specs_e2e/rails_8/storage/test.sqlite3 +0 -0
  192. data/specs_e2e/rails_8/storage/test.sqlite3-shm +0 -0
  193. data/specs_e2e/rails_8/storage/test.sqlite3-wal +0 -0
  194. data/specs_e2e/rails_8/test/application_system_test_case.rb +5 -0
  195. data/specs_e2e/rails_8/test/controllers/posts_controller_test.rb +48 -0
  196. data/specs_e2e/rails_8/test/cypress_fixtures/posts.yml +11 -0
  197. data/specs_e2e/rails_8/test/fixtures/posts.yml +11 -0
  198. data/specs_e2e/rails_8/test/models/post_test.rb +7 -0
  199. data/specs_e2e/rails_8/test/test_helper.rb +15 -0
  200. data/specs_e2e/rails_8/test-results/.last-run.json +4 -0
  201. data/specs_e2e/{rails_5_2 → rails_8}/test.sh +17 -8
  202. metadata +221 -153
  203. data/lib/cypress_on_rails/vcr_middleware.rb +0 -73
  204. data/lib/generators/cypress_on_rails/update_generator.rb +0 -24
  205. data/spec/cypress_on_rails/vcr_middleware_spec.rb +0 -119
  206. data/specs_e2e/rails_3_2/.gitignore +0 -9
  207. data/specs_e2e/rails_3_2/.ruby_version +0 -1
  208. data/specs_e2e/rails_3_2/Gemfile +0 -7
  209. data/specs_e2e/rails_3_2/README.rdoc +0 -261
  210. data/specs_e2e/rails_3_2/app/assets/stylesheets/application.css +0 -13
  211. data/specs_e2e/rails_3_2/app/controllers/application_controller.rb +0 -3
  212. data/specs_e2e/rails_3_2/app/controllers/welcome_controller.rb +0 -4
  213. data/specs_e2e/rails_3_2/app/helpers/application_helper.rb +0 -2
  214. data/specs_e2e/rails_3_2/app/models/post.rb +0 -21
  215. data/specs_e2e/rails_3_2/app/views/layouts/application.html.erb +0 -13
  216. data/specs_e2e/rails_3_2/app/views/welcome/index.html.erb +0 -24
  217. data/specs_e2e/rails_3_2/bin/rails +0 -6
  218. data/specs_e2e/rails_3_2/config/application.rb +0 -68
  219. data/specs_e2e/rails_3_2/config/boot.rb +0 -6
  220. data/specs_e2e/rails_3_2/config/environment.rb +0 -5
  221. data/specs_e2e/rails_3_2/config/environments/development.rb +0 -31
  222. data/specs_e2e/rails_3_2/config/environments/production.rb +0 -64
  223. data/specs_e2e/rails_3_2/config/environments/test.rb +0 -35
  224. data/specs_e2e/rails_3_2/config/initializers/backtrace_silencers.rb +0 -7
  225. data/specs_e2e/rails_3_2/config/initializers/inflections.rb +0 -15
  226. data/specs_e2e/rails_3_2/config/initializers/mime_types.rb +0 -5
  227. data/specs_e2e/rails_3_2/config/initializers/secret_token.rb +0 -7
  228. data/specs_e2e/rails_3_2/config/initializers/session_store.rb +0 -8
  229. data/specs_e2e/rails_3_2/config/locales/en.yml +0 -5
  230. data/specs_e2e/rails_3_2/config/routes.rb +0 -60
  231. data/specs_e2e/rails_3_2/config.ru +0 -4
  232. data/specs_e2e/rails_3_2/public/404.html +0 -26
  233. data/specs_e2e/rails_3_2/public/422.html +0 -26
  234. data/specs_e2e/rails_3_2/public/500.html +0 -25
  235. data/specs_e2e/rails_3_2/public/robots.txt +0 -5
  236. data/specs_e2e/rails_3_2/test.sh +0 -43
  237. data/specs_e2e/rails_4_2/.gitignore +0 -11
  238. data/specs_e2e/rails_4_2/Gemfile +0 -11
  239. data/specs_e2e/rails_4_2/README.rdoc +0 -28
  240. data/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js +0 -2
  241. data/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css +0 -4
  242. data/specs_e2e/rails_4_2/app/controllers/application_controller.rb +0 -5
  243. data/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb +0 -10
  244. data/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb +0 -4
  245. data/specs_e2e/rails_4_2/app/models/post.rb +0 -23
  246. data/specs_e2e/rails_4_2/app/views/layouts/application.html.erb +0 -12
  247. data/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb +0 -6
  248. data/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb +0 -7
  249. data/specs_e2e/rails_4_2/app/views/welcome/index.html.erb +0 -24
  250. data/specs_e2e/rails_4_2/bin/bundle +0 -3
  251. data/specs_e2e/rails_4_2/bin/rails +0 -4
  252. data/specs_e2e/rails_4_2/bin/rake +0 -4
  253. data/specs_e2e/rails_4_2/bin/setup +0 -29
  254. data/specs_e2e/rails_4_2/config/application.rb +0 -32
  255. data/specs_e2e/rails_4_2/config/boot.rb +0 -3
  256. data/specs_e2e/rails_4_2/config/environments/development.rb +0 -25
  257. data/specs_e2e/rails_4_2/config/environments/production.rb +0 -64
  258. data/specs_e2e/rails_4_2/config/environments/test.rb +0 -42
  259. data/specs_e2e/rails_4_2/config/initializers/backtrace_silencers.rb +0 -7
  260. data/specs_e2e/rails_4_2/config/initializers/cookies_serializer.rb +0 -3
  261. data/specs_e2e/rails_4_2/config/initializers/session_store.rb +0 -3
  262. data/specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb +0 -10
  263. data/specs_e2e/rails_4_2/config/initializers/wrap_parameters.rb +0 -9
  264. data/specs_e2e/rails_4_2/config/locales/en.yml +0 -23
  265. data/specs_e2e/rails_4_2/config/routes.rb +0 -61
  266. data/specs_e2e/rails_4_2/config/secrets.yml +0 -22
  267. data/specs_e2e/rails_4_2/package.json +0 -10
  268. data/specs_e2e/rails_4_2/public/favicon.ico +0 -0
  269. data/specs_e2e/rails_4_2/public/robots.txt +0 -5
  270. data/specs_e2e/rails_4_2/test.sh +0 -44
  271. data/specs_e2e/rails_5_2/Gemfile +0 -15
  272. data/specs_e2e/rails_5_2/app/assets/javascripts/posts.js +0 -2
  273. data/specs_e2e/rails_5_2/app/assets/stylesheets/posts.css +0 -4
  274. data/specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css +0 -80
  275. data/specs_e2e/rails_5_2/app/jobs/application_job.rb +0 -2
  276. data/specs_e2e/rails_5_2/app/views/welcome/index.html.erb +0 -5
  277. data/specs_e2e/rails_5_2/bin/bundle +0 -3
  278. data/specs_e2e/rails_5_2/bin/rails +0 -4
  279. data/specs_e2e/rails_5_2/bin/rake +0 -4
  280. data/specs_e2e/rails_5_2/bin/update +0 -25
  281. data/specs_e2e/rails_5_2/config/application.rb +0 -33
  282. data/specs_e2e/rails_5_2/config/boot.rb +0 -4
  283. data/specs_e2e/rails_5_2/config/credentials.yml.enc +0 -1
  284. data/specs_e2e/rails_5_2/config/environments/production.rb +0 -68
  285. data/specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb +0 -7
  286. data/specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb +0 -4
  287. data/specs_e2e/rails_5_2/config/initializers/mime_types.rb +0 -4
  288. data/specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb +0 -9
  289. data/specs_e2e/rails_5_2/config/master.key +0 -1
  290. data/specs_e2e/rails_5_2/public/favicon.ico +0 -0
  291. data/specs_e2e/rails_5_2/public/robots.txt +0 -1
  292. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/controllers/application_controller.rb +0 -0
  293. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/controllers/posts_controller.rb +0 -0
  294. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/helpers/posts_helper.rb +0 -0
  295. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/models/application_record.rb +0 -0
  296. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/models/post.rb +0 -0
  297. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/_form.html.erb +0 -0
  298. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/edit.html.erb +0 -0
  299. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/index.html.erb +0 -0
  300. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/new.html.erb +0 -0
  301. /data/specs_e2e/{rails_5_2 → rails_6_1}/app/views/posts/show.html.erb +0 -0
  302. /data/specs_e2e/{rails_5_2 → rails_6_1}/config/initializers/application_controller_renderer.rb +0 -0
  303. /data/specs_e2e/{rails_5_2 → rails_6_1}/config/initializers/cookies_serializer.rb +0 -0
  304. /data/specs_e2e/{rails_4_2 → rails_6_1}/config/initializers/inflections.rb +0 -0
  305. /data/specs_e2e/{rails_4_2 → rails_6_1}/config/initializers/mime_types.rb +0 -0
  306. /data/specs_e2e/{rails_5_2 → rails_6_1}/config/routes.rb +0 -0
  307. /data/specs_e2e/{rails_5_2 → rails_6_1}/public/404.html +0 -0
  308. /data/specs_e2e/{rails_5_2 → rails_6_1}/public/422.html +0 -0
  309. /data/specs_e2e/{rails_5_2 → rails_6_1}/public/500.html +0 -0
  310. /data/specs_e2e/{rails_5_2 → rails_6_1}/public/apple-touch-icon-precomposed.png +0 -0
  311. /data/specs_e2e/{rails_5_2 → rails_6_1}/public/apple-touch-icon.png +0 -0
  312. /data/specs_e2e/{rails_3_2 → rails_6_1}/public/favicon.ico +0 -0
  313. /data/specs_e2e/{rails_5_2 → rails_6_1}/test/controllers/posts_controller_test.rb +0 -0
  314. /data/specs_e2e/{rails_5_2 → rails_6_1}/test/cypress_fixtures/posts.yml +0 -0
  315. /data/specs_e2e/{rails_5_2 → rails_6_1}/test/fixtures/posts.yml +0 -0
  316. /data/specs_e2e/{rails_5_2 → rails_6_1}/test/models/post_test.rb +0 -0
  317. /data/specs_e2e/{rails_3_2/log → rails_6_1/vendor}/.keep +0 -0
  318. /data/specs_e2e/{rails_3_2/tmp → rails_7_2/vendor}/.keep +0 -0
  319. /data/specs_e2e/{rails_4_2/spec → rails_7_2/vendor/javascript}/.keep +0 -0
  320. /data/specs_e2e/{rails_5_2 → rails_8}/README.md +0 -0
  321. /data/specs_e2e/{rails_4_2/vendor → rails_8/storage}/.keep +0 -0
  322. /data/specs_e2e/{rails_5_2 → rails_8}/vendor/.keep +0 -0
  323. /data/specs_e2e/{rails_3_2/vendor/.gitkeep → rails_8/vendor/javascript/.keep} +0 -0
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ title: MyCypressFixtures
5
+ body: MyText
6
+ published: true
7
+
8
+ two:
9
+ title: MyCypressFixtures2
10
+ body: MyText
11
+ published: true
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ title: MyRailsFixtures
5
+ body: MyText
6
+ published: false
7
+
8
+ two:
9
+ title: MyRailsFixtures2
10
+ body: MyText
11
+ published: false
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class PostTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -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
@@ -0,0 +1,4 @@
1
+ {
2
+ "status": "passed",
3
+ "failedTests": []
4
+ }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  set -eo pipefail
3
3
 
4
- echo '--- testing rails 5.2'
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 and playwright install'
22
- bundle exec ./bin/rails g cypress_on_rails:install --install_folder=test/e2e --cypress_folder=test/cypress --playwright_folder=test/playwright --install_cypress --install_playwright --install_with=npm --skip
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 tmp/pids/server.pid` || true )
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 test test/playwright/e2e/
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 ../tmp/pids/server.pid` || true
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.16.0
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: 2023-10-04 00:00:00.000000000 Z
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: '0'
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: '0'
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/vcr_middleware.rb
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/vcr_middleware_spec.rb
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/rails_3_2/.gitignore
174
- - specs_e2e/rails_3_2/.ruby_version
175
- - specs_e2e/rails_3_2/Gemfile
176
- - specs_e2e/rails_3_2/README.rdoc
177
- - specs_e2e/rails_3_2/Rakefile
178
- - specs_e2e/rails_3_2/app/assets/stylesheets/application.css
179
- - specs_e2e/rails_3_2/app/controllers/application_controller.rb
180
- - specs_e2e/rails_3_2/app/controllers/welcome_controller.rb
181
- - specs_e2e/rails_3_2/app/helpers/application_helper.rb
182
- - specs_e2e/rails_3_2/app/models/post.rb
183
- - specs_e2e/rails_3_2/app/views/layouts/application.html.erb
184
- - specs_e2e/rails_3_2/app/views/welcome/index.html.erb
185
- - specs_e2e/rails_3_2/bin/rails
186
- - specs_e2e/rails_3_2/config.ru
187
- - specs_e2e/rails_3_2/config/application.rb
188
- - specs_e2e/rails_3_2/config/boot.rb
189
- - specs_e2e/rails_3_2/config/environment.rb
190
- - specs_e2e/rails_3_2/config/environments/development.rb
191
- - specs_e2e/rails_3_2/config/environments/production.rb
192
- - specs_e2e/rails_3_2/config/environments/test.rb
193
- - specs_e2e/rails_3_2/config/initializers/backtrace_silencers.rb
194
- - specs_e2e/rails_3_2/config/initializers/inflections.rb
195
- - specs_e2e/rails_3_2/config/initializers/mime_types.rb
196
- - specs_e2e/rails_3_2/config/initializers/secret_token.rb
197
- - specs_e2e/rails_3_2/config/initializers/session_store.rb
198
- - specs_e2e/rails_3_2/config/initializers/wrap_parameters.rb
199
- - specs_e2e/rails_3_2/config/locales/en.yml
200
- - specs_e2e/rails_3_2/config/routes.rb
201
- - specs_e2e/rails_3_2/log/.keep
202
- - specs_e2e/rails_3_2/public/404.html
203
- - specs_e2e/rails_3_2/public/422.html
204
- - specs_e2e/rails_3_2/public/500.html
205
- - specs_e2e/rails_3_2/public/favicon.ico
206
- - specs_e2e/rails_3_2/public/robots.txt
207
- - specs_e2e/rails_3_2/test.sh
208
- - specs_e2e/rails_3_2/tmp/.keep
209
- - specs_e2e/rails_3_2/vendor/.gitkeep
210
- - specs_e2e/rails_4_2/.gitignore
211
- - specs_e2e/rails_4_2/Gemfile
212
- - specs_e2e/rails_4_2/README.rdoc
213
- - specs_e2e/rails_4_2/Rakefile
214
- - specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js
215
- - specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css
216
- - specs_e2e/rails_4_2/app/controllers/application_controller.rb
217
- - specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb
218
- - specs_e2e/rails_4_2/app/controllers/welcome_controller.rb
219
- - specs_e2e/rails_4_2/app/models/post.rb
220
- - specs_e2e/rails_4_2/app/views/layouts/application.html.erb
221
- - specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb
222
- - specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb
223
- - specs_e2e/rails_4_2/app/views/welcome/index.html.erb
224
- - specs_e2e/rails_4_2/bin/bundle
225
- - specs_e2e/rails_4_2/bin/rails
226
- - specs_e2e/rails_4_2/bin/rake
227
- - specs_e2e/rails_4_2/bin/setup
228
- - specs_e2e/rails_4_2/config.ru
229
- - specs_e2e/rails_4_2/config/application.rb
230
- - specs_e2e/rails_4_2/config/boot.rb
231
- - specs_e2e/rails_4_2/config/environment.rb
232
- - specs_e2e/rails_4_2/config/environments/development.rb
233
- - specs_e2e/rails_4_2/config/environments/production.rb
234
- - specs_e2e/rails_4_2/config/environments/test.rb
235
- - specs_e2e/rails_4_2/config/initializers/backtrace_silencers.rb
236
- - specs_e2e/rails_4_2/config/initializers/cookies_serializer.rb
237
- - specs_e2e/rails_4_2/config/initializers/filter_parameter_logging.rb
238
- - specs_e2e/rails_4_2/config/initializers/inflections.rb
239
- - specs_e2e/rails_4_2/config/initializers/mime_types.rb
240
- - specs_e2e/rails_4_2/config/initializers/session_store.rb
241
- - specs_e2e/rails_4_2/config/initializers/to_time_preserves_timezone.rb
242
- - specs_e2e/rails_4_2/config/initializers/wrap_parameters.rb
243
- - specs_e2e/rails_4_2/config/locales/en.yml
244
- - specs_e2e/rails_4_2/config/routes.rb
245
- - specs_e2e/rails_4_2/config/secrets.yml
246
- - specs_e2e/rails_4_2/package.json
247
- - specs_e2e/rails_4_2/public/404.html
248
- - specs_e2e/rails_4_2/public/422.html
249
- - specs_e2e/rails_4_2/public/500.html
250
- - specs_e2e/rails_4_2/public/favicon.ico
251
- - specs_e2e/rails_4_2/public/robots.txt
252
- - specs_e2e/rails_4_2/spec/.keep
253
- - specs_e2e/rails_4_2/test.sh
254
- - specs_e2e/rails_4_2/vendor/.keep
255
- - specs_e2e/rails_5_2/.gitignore
256
- - specs_e2e/rails_5_2/Gemfile
257
- - specs_e2e/rails_5_2/README.md
258
- - specs_e2e/rails_5_2/Rakefile
259
- - specs_e2e/rails_5_2/app/assets/javascripts/posts.js
260
- - specs_e2e/rails_5_2/app/assets/stylesheets/posts.css
261
- - specs_e2e/rails_5_2/app/assets/stylesheets/scaffold.css
262
- - specs_e2e/rails_5_2/app/controllers/application_controller.rb
263
- - specs_e2e/rails_5_2/app/controllers/posts_controller.rb
264
- - specs_e2e/rails_5_2/app/helpers/posts_helper.rb
265
- - specs_e2e/rails_5_2/app/jobs/application_job.rb
266
- - specs_e2e/rails_5_2/app/models/application_record.rb
267
- - specs_e2e/rails_5_2/app/models/post.rb
268
- - specs_e2e/rails_5_2/app/views/layouts/application.html.erb
269
- - specs_e2e/rails_5_2/app/views/posts/_form.html.erb
270
- - specs_e2e/rails_5_2/app/views/posts/edit.html.erb
271
- - specs_e2e/rails_5_2/app/views/posts/index.html.erb
272
- - specs_e2e/rails_5_2/app/views/posts/new.html.erb
273
- - specs_e2e/rails_5_2/app/views/posts/show.html.erb
274
- - specs_e2e/rails_5_2/app/views/welcome/index.html.erb
275
- - specs_e2e/rails_5_2/bin/bundle
276
- - specs_e2e/rails_5_2/bin/rails
277
- - specs_e2e/rails_5_2/bin/rake
278
- - specs_e2e/rails_5_2/bin/setup
279
- - specs_e2e/rails_5_2/bin/update
280
- - specs_e2e/rails_5_2/config.ru
281
- - specs_e2e/rails_5_2/config/application.rb
282
- - specs_e2e/rails_5_2/config/boot.rb
283
- - specs_e2e/rails_5_2/config/credentials.yml.enc
284
- - specs_e2e/rails_5_2/config/database.yml
285
- - specs_e2e/rails_5_2/config/environment.rb
286
- - specs_e2e/rails_5_2/config/environments/development.rb
287
- - specs_e2e/rails_5_2/config/environments/production.rb
288
- - specs_e2e/rails_5_2/config/environments/test.rb
289
- - specs_e2e/rails_5_2/config/initializers/application_controller_renderer.rb
290
- - specs_e2e/rails_5_2/config/initializers/backtrace_silencers.rb
291
- - specs_e2e/rails_5_2/config/initializers/content_security_policy.rb
292
- - specs_e2e/rails_5_2/config/initializers/cookies_serializer.rb
293
- - specs_e2e/rails_5_2/config/initializers/filter_parameter_logging.rb
294
- - specs_e2e/rails_5_2/config/initializers/inflections.rb
295
- - specs_e2e/rails_5_2/config/initializers/mime_types.rb
296
- - specs_e2e/rails_5_2/config/initializers/wrap_parameters.rb
297
- - specs_e2e/rails_5_2/config/locales/en.yml
298
- - specs_e2e/rails_5_2/config/master.key
299
- - specs_e2e/rails_5_2/config/routes.rb
300
- - specs_e2e/rails_5_2/db/migrate/20180621085832_create_posts.rb
301
- - specs_e2e/rails_5_2/public/404.html
302
- - specs_e2e/rails_5_2/public/422.html
303
- - specs_e2e/rails_5_2/public/500.html
304
- - specs_e2e/rails_5_2/public/apple-touch-icon-precomposed.png
305
- - specs_e2e/rails_5_2/public/apple-touch-icon.png
306
- - specs_e2e/rails_5_2/public/favicon.ico
307
- - specs_e2e/rails_5_2/public/robots.txt
308
- - specs_e2e/rails_5_2/test.sh
309
- - specs_e2e/rails_5_2/test/controllers/posts_controller_test.rb
310
- - specs_e2e/rails_5_2/test/cypress_fixtures/posts.yml
311
- - specs_e2e/rails_5_2/test/fixtures/posts.yml
312
- - specs_e2e/rails_5_2/test/models/post_test.rb
313
- - specs_e2e/rails_5_2/vendor/.keep
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.4.7
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