ci: Playwright e2e against shopware-demo-environment - #3
Merged
Conversation
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.
checkout v4->v7, setup-node v4->v6, upload-artifact v4->v7, shopware-cli-action v1->v3 (store-info). Clears the Node 20 deprecation warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions workflow that runs the Playwright suite end-to-end:
shopware-cli extension build.:6.7) on port 8000.Resources/public) into the container andplugin:install --activate+assets:install.npx playwright testfromtests/againsthttp://localhost:8000; uploads the HTML report as an artifact.Validated locally against the same container: all 5 specs pass.
Also:
select-nameon slower CI).tests/package-lock.jsonis now tracked sonpm ciworks in CI.