Skip to content

Clean installation issue #201

@alec-c4

Description

@alec-c4

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

Image

and bin/rails cypress:open will produce

Image

but when you change the path in your initializer to the

    c.install_folder = File.expand_path("#{__dir__}/../../e2e/")

everything looks better

Image Image

but not perfect

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions