Skip to content

test: refactor to modules and accessible locators.#36

Merged
knightedcodemonkey merged 2 commits intomainfrom
bananas
Mar 28, 2026
Merged

test: refactor to modules and accessible locators.#36
knightedcodemonkey merged 2 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

@knightedcodemonkey knightedcodemonkey commented Mar 28, 2026

Copilot AI review requested due to automatic review settings March 28, 2026 02:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the existing monolithic Playwright e2e coverage into focused spec modules while shifting selectors toward accessibility-first locators. To support that, it adds/strengthens ARIA semantics in the app (status, panels, preview host, editor fallback) and exposes a way to apply ARIA attributes to the CodeMirror editor content.

Changes:

  • Add ARIA roles/labels for status, panels, preview output region, and editor textarea fallbacks.
  • Extend CodeMirror editor setup to optionally apply contentAttributes (used to label the editor content for accessibility).
  • Split playwright/app.spec.ts into multiple spec files + shared helper utilities and document the selector conventions in AGENTS.md.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/render-runtime.js Preserve preview host accessibility semantics when recreating the host node.
src/modules/editor-codemirror.js Add optional contentAttributes support for CodeMirror content DOM.
src/index.html Add ARIA semantics for status, panels (aria-labelledby), preview host region, and editor fallback textareas.
src/app.js Pass ARIA attributes into CodeMirror initialization for editor accessibility.
playwright/helpers/app-test-helpers.ts Centralize Playwright helper functions for app setup and common interactions.
playwright/layout-panels.spec.ts New focused tests for layout/panels behavior using accessible locators.
playwright/rendering-modes.spec.ts New focused tests for rendering/style modes and typecheck behavior.
playwright/diagnostics.spec.ts New focused tests for diagnostics drawer and related editor navigation behavior.
playwright/github-pr-drawer.spec.ts New focused tests for the Open PR drawer behavior and validation.
playwright/github-byot-ai.spec.ts New focused tests for BYOT + AI chat/open PR feature-flagged UI flows.
playwright/app.spec.ts Remove the previous monolithic spec in favor of modular specs/helpers.
AGENTS.md Document Playwright selector guidance: prefer accessible locators, use locator() as fallback.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit 9017e66 into main Mar 28, 2026
2 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 28, 2026 03: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.

Refactor playwright specs

2 participants