-
-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Hey, Justin!
I've found an issue with the clean installation of your gem. If you follow the instructions in your README to add cypress-on-rails to the new project, you'll see an interesting issue.
After bin/rails g cypress_on_rails:install, you'll see
create e2e/cypress/support/index.js
create e2e/cypress/support/commands.js
create e2e/cypress.config.js
create config/initializers/cypress_on_rails.rb
create e2e/cypress/e2e_helper.rb
create e2e/cypress/app_commands
create e2e/cypress/app_commands/activerecord_fixtures.rb
create e2e/cypress/app_commands/clean.rb
create e2e/cypress/app_commands/eval.rb
create e2e/cypress/app_commands/factory_bot.rb
create e2e/cypress/app_commands/log_fail.rb
create e2e/cypress/app_commands/scenarios/basic.rb
create e2e/cypress/support/on-rails.js
create e2e/cypress/e2e/rails_examples
create e2e/cypress/e2e/rails_examples/advance_factory_bot.cy.js
create e2e/cypress/e2e/rails_examples/other.cy.js
create e2e/cypress/e2e/rails_examples/using_factory_bot.cy.js
create e2e/cypress/e2e/rails_examples/using_fixtures.cy.js
create e2e/cypress/e2e/rails_examples/using_scenarios.cy.js
create e2e/cypress/e2e/rails_examples/using_vcr.cy.js
unchanged e2e/cypress/support/index.js
and an initializer with the following code
c.install_folder = File.expand_path("#{__dir__}/../../e2e/cypress")But bin/rails cypress:run will produce
and bin/rails cypress:open will produce
but when you change the path in your initializer to the
c.install_folder = File.expand_path("#{__dir__}/../../e2e/")everything looks better
but not perfect
Looks like a path issue. In earlier versions, there was a cypress directory in the project root, but now everything has changed. Of course, I can change the paths in the initializer or re-organize directories in the e2e directory, but I think it will be better to tune a bit the gem installation process.