Write a Github Actions that runs the Jasmine tests for the frontend https://developer.adobe.com/commerce/testing/guide/js/
damienwebdev opened this issue · 2 comments
There is a problem with running headless Chromium, most likely related to old versions of puppeteer
in grunt-contrib-jasmine
package, which is not actively maintained, same as other Grunt things.
Quick fix is to symlink binary to the correct place:
apt install chromium
ln -s /usr/bin/chromium /usr/bin/chromium-browser
On M1 Macs it's a bit more complicated, there is a description how to make it works - puppeteer/puppeteer#6622 (comment)
Besides that, the linked guide is fine, I managed to run them locally, most of them are green, except this one magento/magento2#36395
Unfortunately, tests are slow, it takes about 10 min to run tests for backend, blank and luma.
In case of any problems, it's best to re-run a single test file using:
grunt spec:blank --file="dev/tests/js/jasmine/tests/..."
@Igloczek thanks for doing this investigation, it's really wonderful. Are you able to replicate the steps you ran locally and add an action for them here? https://github.com/graycoreio/github-actions-magento2