intl-tel-input icon indicating copy to clipboard operation
intl-tel-input copied to clipboard

Tweak Jasmine config to use custom browser on MacOSX (arm64)

Open oleh-demyanyuk opened this issue 1 year ago • 3 comments

oleh-demyanyuk avatar Nov 29 '23 10:11 oleh-demyanyuk

Hi there, can you provide some information on why this is needed?

jackocnr avatar Dec 07 '23 12:12 jackocnr

Hi @jackocnr I've had troubles running npm test on MacOSX with recent chromedriver (installed via brew). Currently new popular way is to use Google Chrome for Testing https://developer.chrome.com/blog/chrome-for-testing

So I've tweaked config to be able to run against Google Chrome for Testing . After test passed I was able to build lib on MacOSX and integrate into rails related lib. You can ignore it, or rewrite as you see it. Regards

oleh-demyanyuk avatar Dec 18 '23 20:12 oleh-demyanyuk

For anyone coming here having the same problems as @oleh-demyanyuk above, this is how I got it working on my M1 MacBook:

  1. Follow the steps in this guide to get Chromium installed on your machine
  2. Manually override the hardcoded path to Chromium (🤦) in the Launcher.js file in node_modules/puppeteer (more detailed info can be found in this comment)

The environmental variables you set in your ~/.zshrc to define where Chromium is installed doesn't work for some reason. And I'm guessing you have to manually change this if you run npm install again after this.

carlssonemil avatar Feb 20 '24 13:02 carlssonemil

We're now moving over to Jest, so I'll close this.

jackocnr avatar Jun 24 '24 10:06 jackocnr