How to run Cypress and Playwright side-to-side on a migration scenario #163
wagnerpereira
started this conversation in
General
Replies: 1 comment
-
Thanks on creating this discussion! We opt to create a env var to select the e2e framework on execution time on pipeline. Like this: if defined?(CypressOnRails)
CypressOnRails.configure do |c|
c.api_prefix = ""
c.install_folder = File.expand_path("#{__dir__}/../../spec/#{ENV["FRAMEWORK_E2E"]}")
# WARNING!! CypressOnRails can execute arbitrary ruby code
# please use with extra caution if enabling on hosted servers or starting your lo Then we pass this ENV var on each github actions workflow job, cypress and playwright:
...
- name: Run http server with the app in the background
env:
PGUSER: postgres
PGHOST: localhost
REDIS_URL: redis://localhost:6379/0
RAILS_ENV: test
COVERAGE: true
FRAMEWORK_E2E: playwright
run: |
nohup bundle exec rails server -b 0.0.0.0 -p 3000 &
echo $! > rails_server.pid
... Thanks again! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm setting up Playwright to run in parallel to cypress on our pipeline during migration from cypress to playwright.
What could be the best approach to cypress-on-rails to support this scenário of migration beetween the two ?
install_folder need to change in each context.
Cypress
Playwright
Gem initializer should be agnostic?
Beta Was this translation helpful? Give feedback.
All reactions