refactor(alpinejs): Fix test execution and correct minor mistakes in test files#16484
refactor(alpinejs): Fix test execution and correct minor mistakes in test files#16484rururux wants to merge 7 commits intowithastro:mainfrom
Conversation
|
There was a problem hiding this comment.
Just a copy of packages/astro/playwright.config.js
|
I noticed that running |
|
It's weird that Perhaps we should migrate |
|
I believe this test is written to use Playwright because AlpineJS operates via CSR. |



Changes
test:e2ecommand totest:e2e:astrotest:e2e:alpinejscommandtest:e2eto run bothtest:e2e:astroandtest:e2e:alpinejspackages/integrations/alpinejs/playwright.config.js(because CI failed without this)Previously, the test files for

integrations/alpinejswere not being run correctly.The reason is that the alpinejs integration only contains e2e tests, and those files are not picked up by the
test:integrationscommand.You can see this in the CI logs of an already-merged pull request, searching for "alpinejs" returns only one hit:
https://github.com/withastro/astro/actions/runs/24900093515/job/72915439313
To address this, I added a new
test:e2e:alpinejscommand that explicitly runs the tests for the alpinejs integration.I also moved the contents of the existing
test:e2ecommand intotest:e2e:astro, and configuredtest:e2eto run bothtest:e2e:astroandtest:e2e:alpinejs.I also noticed that
test-utils.tsfile was still using.jsas the file extension when detecting files, and another had an incorrect path to a test fixture, so I went ahead and corrected those as well.Additionally, I updated the test assertions to use a more reliable approach, as the tests were occasionally showing as flaky in CI.
Testing
Green CI
Docs
N/A, This will not affect users