Skip to content

ci: Playwright e2e against shopware-demo-environment - #3

Merged
shyim merged 9 commits into
mainfrom
ci/playwright-e2e
Jun 20, 2026
Merged

ci: Playwright e2e against shopware-demo-environment#3
shyim merged 9 commits into
mainfrom
ci/playwright-e2e

Conversation

@shyim

@shyim shyim commented Jun 20, 2026

Copy link
Copy Markdown
Member

Adds a GitHub Actions workflow that runs the Playwright suite end-to-end:

  1. Compiles the plugin's administration assets with shopware-cli extension build.
  2. Boots the shopware-demo-environment container (:6.7) on port 8000.
  3. Waits for the admin to respond, then copies the plugin (incl. compiled Resources/public) into the container and plugin:install --activate + assets:install.
  4. Runs npx playwright test from tests/ against http://localhost:8000; uploads the HTML report as an artifact.

Validated locally against the same container: all 5 specs pass.

Also:

  • a11y spec now waits for the async range-select labeling to settle before scanning (prevents a false select-name on slower CI).
  • tests/package-lock.json is now tracked so npm ci works in CI.

shyim added 7 commits June 20, 2026 09:32
Boots the FriendsOfShopware demo container (6.7), compiles the plugin admin
assets with shopware-cli, installs+activates the plugin into the container, and
runs the Playwright suite against it.

Also make the a11y spec wait until the async range-select labeling settles
before scanning (avoids a false select-name violation on slower CI machines),
and track tests/package-lock.json so 'npm ci' works.
The previous wait ('no unlabelled selects') passed while the chart-card selects
had not rendered yet, letting axe race the async labelling on slower CI and
report a false select-name. Wait until both labelled selects exist (30s budget).
Replace the docker cp + bin/console install dance with the shopware-cli remote
extension management: build a zip with 'extension zip', then
'project extension upload --activate' through the Admin API. Connection comes
from a committed .shopware-project.yml that is env-substituted (no secrets).
It's unneeded for the http://localhost CI URL (TLS checks don't apply to http)
and a committed 'disable_ssl_check: true' default is a foot-gun for local runs
against real shops. Set it via the local override / env only if ever needed.
shopware-cli reads SHOPWARE_CLI_API_URL/USERNAME/PASSWORD directly (they take
precedence over any config), so 'project extension upload --activate' needs no
.shopware-project.yml at all. Drop the committed config file and pass the env
vars from the workflow instead.
The previous commit only recorded the config-file deletion; the workflow + README
edits were dropped because an erroring 'git add' aborted before staging them.
Now that the plugin is installed over the Admin API (no docker cp/exec needed),
the demo image fits as a GitHub Actions service. Drop the manual 'docker run'
step; keep a readiness poll since the image has no HEALTHCHECK.
@shyim
shyim force-pushed the ci/playwright-e2e branch from c98b073 to 42d6b3e Compare June 20, 2026 08:40
shyim added 2 commits June 20, 2026 10:52
checkout v4->v7, setup-node v4->v6, upload-artifact v4->v7, shopware-cli-action
v1->v3 (store-info). Clears the Node 20 deprecation warning.
@shyim
shyim merged commit ce73b9b into main Jun 20, 2026
4 checks passed
@shyim
shyim deleted the ci/playwright-e2e branch June 20, 2026 10:55
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.

1 participant