Skip to content

Improve installer template testability (accessibility-first) - #23

Merged
Soner (shyim) merged 1 commit into
mainfrom
claude/lucid-allen-2g1i2h
Jun 22, 2026
Merged

Soner (shyim) merged 1 commit into
mainfrom
claude/lucid-allen-2g1i2h

Conversation

@shyim

@shyim Soner (shyim) commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

What

Make the installer reliably targetable from acceptance tests, preferring accessible locators (getByRole / getByLabel / getByText) over test-only hooks and adding data-testid only where no accessible handle exists.

Changes

File Change Rationale
php_config.html.twig Fix the PHP-binary field's label association (<label for="name"> → for="phpBinary", add matching id to the input) The for pointed at a non-existent id, so getByLabel('PHP binary') didn't work. Fixing accessibility is preferred over adding a test id.
install.html.twig data-testid="install-log-output" on the log <pre> A streamed-log <pre> has no role, accessible name or stable text — it can't be located accessibly.
update.html.twig data-testid="update-log-output" on the log <pre> Same as above.

Everything else in the installer (buttons, links, headings, labeled selects, visible text, alerts) is already reachable via role/label/text locators, so no test ids were added there.

Notes

  • Net change is 3 files / 4 lines; no Twig logic touched.
  • All 85 existing PHPUnit tests pass (256 assertions).
  • No companion change is needed in shopware/shopware: the acceptance suite's Update.spec.ts already uses accessible getByRole locators for this installer's steps (Continue / Update Shopware / Finish / Open Administration), and those remain valid.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TJMFV7jMT6L1Re9DPQtfwF

Make the installer reliably targetable from acceptance tests while
preferring accessible locators over test-only hooks:

- Fix the PHP binary field's broken label association (the <label> used
  for="name" but no matching id existed), so the input is reachable via
  an accessible label locator instead of needing a test id.
- Add data-testid only to the streamed log <pre> elements on the
  install and update pages, which have no role, accessible name or
  stable text and therefore cannot be located accessibly.

Everything else (buttons, links, headings, labeled selects, visible
text, alerts) is already reachable through role/label/text locators, so
no test ids were added there. All 85 existing tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TJMFV7jMT6L1Re9DPQtfwF
@shyim
Soner (shyim) force-pushed the claude/lucid-allen-2g1i2h branch from 07797d6 to 3656289 Compare June 22, 2026 07:41
@shyim Soner (shyim) changed the title Add data-testid attributes to installer templates Improve installer template testability (accessibility-first) Jun 22, 2026
@shyim
Soner (shyim) marked this pull request as ready for review June 22, 2026 07:57
@shyim
Soner (shyim) merged commit b8b1ba8 into main Jun 22, 2026
12 checks passed
@shyim
Soner (shyim) deleted the claude/lucid-allen-2g1i2h branch June 22, 2026 08:01
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