Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install & Update jobs install Cypress files in different locations #140

Closed
mikecarroll opened this issue Nov 4, 2023 · 4 comments
Closed

Comments

@mikecarroll
Copy link

cypress_on_rails:install => installs files at cypress directory

cypress_on_rails:update => installs files at spec/e2e

See below output on latest gem cut (1.16.1) and a blank Rails 7.1 app.

Which is correct path here? Which is going to be the supported default in the future?

cypresstest % bin/rails g cypress_on_rails:install
yarn --cwd=/Users/woodchip/cypresstest/ add cypress --dev
yarn add v1.22.19
info No lockfile found.
[1/4] 🔍  Resolving packages...
⠁ (node:34018) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 159 new dependencies.
info Direct dependencies
└─ cypress@13.4.0
info All dependencies
├─ @colors/colors@1.5.0
├─ @cypress/request@3.0.1
├─ @cypress/xvfb@1.2.4
├─ @types/node@18.18.8
├─ @types/sinonjs__fake-timers@8.1.1
├─ @types/sizzle@2.3.5
├─ @types/yauzl@2.10.2
├─ aggregate-error@3.1.0
├─ ansi-colors@4.1.3
├─ ansi-escapes@4.3.2
├─ ansi-regex@5.0.1
├─ arch@2.2.0
├─ asn1@0.2.6
├─ async@3.2.5
├─ asynckit@0.4.0
├─ at-least-node@1.0.0
├─ aws-sign2@0.7.0
├─ aws4@1.12.0
├─ balanced-match@1.0.2
├─ base64-js@1.5.1
├─ bcrypt-pbkdf@1.0.2
├─ blob-util@2.0.2
├─ bluebird@3.7.2
├─ brace-expansion@1.1.11
├─ buffer-crc32@0.2.13
├─ buffer@5.7.1
├─ cachedir@2.4.0
├─ call-bind@1.0.5
├─ caseless@0.12.0
├─ check-more-types@2.24.0
├─ ci-info@3.9.0
├─ clean-stack@2.2.0
├─ cli-table3@0.6.3
├─ cli-truncate@2.1.0
├─ color-convert@2.0.1
├─ color-name@1.1.4
├─ colorette@2.0.20
├─ combined-stream@1.0.8
├─ commander@6.2.1
├─ common-tags@1.8.2
├─ concat-map@0.0.1
├─ core-util-is@1.0.2
├─ cross-spawn@7.0.3
├─ cypress@13.4.0
├─ dashdash@1.14.1
├─ dayjs@1.11.10
├─ debug@4.3.4
├─ define-data-property@1.1.1
├─ delayed-stream@1.0.0
├─ ecc-jsbn@0.1.2
├─ emoji-regex@8.0.0
├─ end-of-stream@1.4.4
├─ enquirer@2.4.1
├─ escape-string-regexp@1.0.5
├─ eventemitter2@6.4.7
├─ execa@4.1.0
├─ executable@4.1.1
├─ extend@3.0.2
├─ extract-zip@2.0.1
├─ extsprintf@1.3.0
├─ fd-slicer@1.1.0
├─ figures@3.2.0
├─ forever-agent@0.6.1
├─ form-data@2.3.3
├─ fs-extra@9.1.0
├─ fs.realpath@1.0.0
├─ get-stream@5.2.0
├─ getos@3.2.1
├─ getpass@0.1.7
├─ glob@7.2.3
├─ global-dirs@3.0.1
├─ graceful-fs@4.2.11
├─ has-proto@1.0.1
├─ has-symbols@1.0.3
├─ hasown@2.0.0
├─ http-signature@1.3.6
├─ human-signals@1.1.1
├─ ieee754@1.2.1
├─ indent-string@4.0.0
├─ inflight@1.0.6
├─ inherits@2.0.4
├─ ini@2.0.0
├─ is-ci@3.0.1
├─ is-installed-globally@0.4.0
├─ is-path-inside@3.0.3
├─ is-stream@2.0.1
├─ is-typedarray@1.0.0
├─ is-unicode-supported@0.1.0
├─ isexe@2.0.0
├─ isstream@0.1.2
├─ json-schema@0.4.0
├─ json-stringify-safe@5.0.1
├─ jsonfile@6.1.0
├─ jsprim@2.0.2
├─ lazy-ass@1.6.0
├─ listr2@3.14.0
├─ lodash.once@4.1.1
├─ lodash@4.17.21
├─ log-symbols@4.1.0
├─ log-update@4.0.0
├─ lru-cache@6.0.0
├─ merge-stream@2.0.0
├─ mime-db@1.52.0
├─ mime-types@2.1.35
├─ mimic-fn@2.1.0
├─ minimatch@3.1.2
├─ minimist@1.2.8
├─ ms@2.1.2
├─ npm-run-path@4.0.1
├─ object-inspect@1.13.1
├─ once@1.4.0
├─ ospath@1.2.2
├─ p-map@4.0.0
├─ path-is-absolute@1.0.1
├─ path-key@3.1.1
├─ pend@1.2.0
├─ performance-now@2.1.0
├─ pify@2.3.0
├─ pretty-bytes@5.6.0
├─ process@0.11.10
├─ proxy-from-env@1.0.0
├─ psl@1.9.0
├─ pump@3.0.0
├─ punycode@2.3.1
├─ qs@6.10.4
├─ querystringify@2.2.0
├─ request-progress@3.0.0
├─ requires-port@1.0.0
├─ restore-cursor@3.1.0
├─ rfdc@1.3.0
├─ rimraf@3.0.2
├─ rxjs@7.8.1
├─ safe-buffer@5.2.1
├─ safer-buffer@2.1.2
├─ semver@7.5.4
├─ set-function-length@1.1.1
├─ shebang-command@2.0.0
├─ shebang-regex@3.0.0
├─ side-channel@1.0.4
├─ slice-ansi@3.0.0
├─ sshpk@1.18.0
├─ strip-final-newline@2.0.0
├─ supports-color@8.1.1
├─ throttleit@1.0.0
├─ through@2.3.8
├─ tmp@0.2.1
├─ tough-cookie@4.1.3
├─ tslib@2.6.2
├─ tunnel-agent@0.6.0
├─ tweetnacl@0.14.5
├─ type-fest@0.21.3
├─ undici-types@5.26.5
├─ untildify@4.0.0
├─ url-parse@1.5.10
├─ uuid@8.3.2
├─ verror@1.10.0
├─ which@2.0.2
├─ wrap-ansi@7.0.0
└─ yallist@4.0.0
✨  Done in 24.12s.
      create  cypress/support/index.js
      create  cypress/support/commands.js
      create  cypress.config.js
      create  config/initializers/cypress_on_rails.rb
      create  e2e/e2e_helper.rb
      create  e2e/app_commands
      create  e2e/app_commands/activerecord_fixtures.rb
      create  e2e/app_commands/clean.rb
      create  e2e/app_commands/eval.rb
      create  e2e/app_commands/factory_bot.rb
      create  e2e/app_commands/log_fail.rb
      create  e2e/app_commands/scenarios/basic.rb
      create  cypress/support/on-rails.js
      create  cypress/e2e/rails_examples
      create  cypress/e2e/rails_examples/advance_factory_bot.cy.js
      create  cypress/e2e/rails_examples/other.cy.js
      create  cypress/e2e/rails_examples/using_factory_bot.cy.js
      create  cypress/e2e/rails_examples/using_fixtures.cy.js
      create  cypress/e2e/rails_examples/using_scenarios.cy.js
      create  cypress/e2e/rails_examples/using_vcr.cy.js
   unchanged  cypress/support/index.js
The file /cypresstest/playwright/support/index.js does not appear to exist

 cypresstest % bin/rails g cypress_on_rails:update
    conflict  config/initializers/cypress_on_rails.rb
Overwrite /cypresstest/config/initializers/cypress_on_rails.rb? (enter "h" for help) [Ynaqdhm] y
       force  config/initializers/cypress_on_rails.rb
      create  spec/e2e/e2e_helper.rb
      create  spec/e2e/app_commands
      create  spec/e2e/app_commands/activerecord_fixtures.rb
      create  spec/e2e/app_commands/clean.rb
      create  spec/e2e/app_commands/eval.rb
      create  spec/e2e/app_commands/factory_bot.rb
      create  spec/e2e/app_commands/log_fail.rb
      create  spec/e2e/app_commands/scenarios/basic.rb
      create  spec/cypress/support/on-rails.js
@mikecarroll
Copy link
Author

Any feedback on this one? I'd be happy to help fix this if I have some capacity, but hard to know what the intent is. Between the install task which installs at /cypress and the update task which installs at spec/e2e where should these files be going?

@grantspeelman
Copy link
Collaborator

good point. I'll update it to be consistent.

@grantspeelman
Copy link
Collaborator

grantspeelman commented Jan 4, 2024

decided to remove the update generator and instead updated the README to suggest using the install generator to update the files. #149

@mikecarroll
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants