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

Swapped the yarn add playwright command with a generic yarn install #1648

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

crismali
Copy link
Contributor

What it does

Instead of running yarn add for playwright, this just runs yarn install in the bin/setup script. This way the version of playwright that's listed in the package.json is ultimately installed.

Why it is important

I was running into an issue where running bin/setup would change the playwright version from 1.46.0 to 1.45.0 in the package.json. If I cleared those changes it would trip up the capybara/playwright immigration and tell me playwright wasn't actually installed.

Implementation notes

I think there's a case to be made to lock playwright to what the ruby implementation considers a compatible version (via bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION'). Maybe a general dependency update changed the package.json and these got out of sync and we just need to figure out a better way to keep them in sync?

@crismali crismali self-assigned this Aug 20, 2024
Copy link
Contributor

@phinze phinze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicating some stuff I said in slack...

I've been having the same issue - the original blog post we were following said to do this, but I think it's just not the best approach https://justin.searls.co/posts/running-rails-system-tests-with-playwright-instead-of-selenium/

Hm but yes dependabot has taken us ahead of the ruby driver's stated compatibility

Here's the Ruby driver's equivalent update, still in draft mode YusukeIwaki/playwright-ruby-client#301

I wonder if it's better for us to have dependabot ignore playwright on the javascript side and then we just remember to follow ruby updates with equivalent JS ones

(We have the same issue with Rails because it's released as simultaneous Ruby + JS updates and dependabot can't do cross-dependency-type batches)

Regardless this is the right next step I think!

@crismali crismali merged commit 73a5d2d into main Aug 20, 2024
9 checks passed
@crismali crismali deleted the michael-remove-yarn-add-playwright-from-setup branch August 20, 2024 15:29
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

Successfully merging this pull request may close these issues.

2 participants