github-actions-magento2
github-actions-magento2 copied to clipboard
[FEAT] Cypress Tests
:bulb: Feature request
Feature Name
Cypress-Test-Action
The Desired Behavior
Automated E2E tests for out of box store validation.
Your Use Case
As a user, if I'm testing an extension, I may want to do E2E tests to validate that I didn't break anything.
Prior Work
https://github.com/elgentos/magento2-cypress-testing-suite
@peterjaap is this something you may be interested in contributing? Or, @vinai if you have experience this would be something that could be used in MageOS for "smoke tests".
Yes, I'd be interested! I have 0 experience with Github Actions but I do have a ton of experience with Gitlab CI/CD so how hard can it be? :man_shrugging: (famous last words)
Hahaha. Hopefully it's pretty easy! https://github.com/graycoreio/github-actions-magento2/blob/main/.github/workflows/integration.yaml may be a close equivalent?
I'm now using this action by Cypress itself over at elgentos/magento2-cypress-testing-suite and it works perfectly!
@peterjaap looking at the action:
These look like inputs to an action (and therefore could be encapsulated in some way).
CYPRESS_MAGENTO2_SKIP_CHECKOUT: 'true'
CYPRESS_MAGENTO2_SPEC_SUITE: 'hyva'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_MAGENTO2_BASE_URL: 'https://hyva-demo.elgentos.io'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_VIDEO_COMPRESSION: 0
CYPRESS_RETRIES: 3
Additionally, assuming one were to have a "stock" Magento install that they were testing their extension with, how would I run the cypress tests? I think that's where I would be reaching for an off-the-shelf solution.
There's probably three kinds of tests that I want to support:
- Cypress Tests for Extensions (smoke) - Smoke Testing that their extension didn't break existing features
- Cypress Tests for Stores - Requires in-repo configurations that I think you're most familiar with
- Cypress Tests for Extensions - Acceptance testing specific features of that specific extension.
Closing in favor of https://github.com/mage-os/github-actions/issues/11