Skip to content

feat!: add generic e2e support to check-store workflow#279

Open
digitalrisedorset wants to merge 6 commits into
graycoreio:mainfrom
digitalrisedorset:feat/check-store-e2e-support
Open

feat!: add generic e2e support to check-store workflow#279
digitalrisedorset wants to merge 6 commits into
graycoreio:mainfrom
digitalrisedorset:feat/check-store-e2e-support

Conversation

@digitalrisedorset
Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

check-store.yaml currently supports:

  • coding-standard
  • unit-test
  • smoke-test

There is currently no generic mechanism for executing optional store-defined E2E test suites within the reusable workflow.

Fixes: N/A

What is the new behavior?

Adds optional e2e-test support to check-store.yaml.

The workflow now:

  • provisions a Node runtime
  • installs npm dependencies when a package.json exists
  • executes npm run test:e2e

This keeps E2E implementation details owned by the consuming store while allowing Mage-OS CI orchestration to execute generic Node-based E2E suites.

A minimal TypeScript-based E2E fixture was also added to validate the orchestration flow.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This intentionally keeps the E2E contract lightweight and framework-agnostic for now.

The workflow orchestrates execution but does not enforce:

  • Playwright
  • Cypress
  • browser-specific tooling
  • E2E file structure conventions

This allows consuming stores to define their own E2E implementation details while reusing the existing Mage-OS orchestration and Magento service bootstrapping.

Comment thread .github/workflows/check-store.yaml
Comment thread .github/workflows/check-store.yaml Outdated
Comment thread .github/workflows/check-store.yaml
Comment thread .github/workflows/check-store.yaml Outdated
Comment thread .github/workflows/check-store.yaml Outdated
Comment thread .github/workflows/check-store.yaml
Comment thread _test/demo-package/Test/E2E/ItWorksTest.ts
Comment thread _test/demo-package/Test/E2E/tsconfig.json Outdated
Comment thread package.json Outdated
"description": "Github Actions for Magento 2",
"scripts": {
"test": "cd supported-version && npm run test && cd - && cd setup-install && npm run test && cd -",
"test:e2e": "ts-node dev/tests/e2e/**/*.ts",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove this.

@@ -0,0 +1,33 @@
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file likely isn't necessary

working-directory: ${{ steps.setup-magento.outputs.path }}
run: |
npm ci
npm run test:e2e No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does test:e2e exist as a script in every Magento store with a dev/tests/e2e folder?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This command exists so that we can executes the elgentos playwright test suite under dev/tests/e2e. I assume you are clear with this. I added it in package.json for CI to be able to trigger this test suite. Somehow, I unclear how e2e gets trigger without the command-line. I will follow your lead and will remove the code as per your suggestions, thanks

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