Skip to content

fix: update @playwright/test to 1.59.1 and fix e2e tests#381

Open
Pixel998 wants to merge 1 commit intomainfrom
fix/playwright-1.59.1-e2e-tests
Open

fix: update @playwright/test to 1.59.1 and fix e2e tests#381
Pixel998 wants to merge 1 commit intomainfrom
fix/playwright-1.59.1-e2e-tests

Conversation

@Pixel998
Copy link
Copy Markdown
Contributor

@Pixel998 Pixel998 commented Apr 8, 2026

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

This PR updates @playwright/test to 1.59.1 and fixes the e2e tests that became unreliable after the upgrade.

The failing tests were using keyboard-driven select-all and delete behavior inside the CodeMirror editor. After the Playwright update, that interaction no longer behaved consistently across browsers, especially in WebKit, so the default sample code was not always fully replaced before assertions ran.

What changes did you make? (Give an overview)

  • Updated @playwright/test to 1.59.1
  • Added a shared helper for interacting with the CodeMirror editor in the e2e tests. The affected tests now replace editor contents using fill() instead of relying on Ctrl/Cmd+A followed by Backspace.

Related Issues

#380

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Apr 8, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit 934e73e
🔍 Latest deploy log https://app.netlify.com/projects/eslint-code-explorer/deploys/69d5bff57997a700083f8182
😎 Deploy Preview https://deploy-preview-381--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

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

This PR updates Playwright to @playwright/test@1.59.1 and refactors e2e tests to interact with the CodeMirror editor more reliably after the upgrade.

Changes:

  • Bumped @playwright/test (and lockfile-resolved playwright / playwright-core) to 1.59.1.
  • Added a shared CodeMirror editor helper for e2e tests.
  • Updated affected e2e tests to replace editor contents via fill() rather than keyboard-driven select-all/delete.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Updates @playwright/test devDependency version to ^1.59.1.
package-lock.json Aligns resolved Playwright packages (@playwright/test, playwright, playwright-core) to 1.59.1.
e2e-tests/helpers/code-editor.ts Introduces shared helpers to locate and replace CodeMirror editor content in tests.
e2e-tests/persistence.test.ts Uses the shared helper to reliably set/assert editor content during hash/localStorage persistence flows.
e2e-tests/code-editing-and-ast-interaction.test.ts Uses the shared helper for deterministic editor updates during AST + ESQuery interactions.

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

Comment on lines +6 to +7
.getByRole("textbox")
.last();
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

getCodeEditor() currently selects the last textbox within the "Code Editor Panel" region. Since the panel already contains multiple textboxes (e.g. the ESQuery selector) and could gain more over time, this selector is brittle and may start pointing at the wrong element. Prefer selecting the editor by its accessible name (the CodeMirror component sets aria-label="Code Editor"), e.g. query the textbox with name "Code Editor" (optionally still scoped to the region).

Suggested change
.getByRole("textbox")
.last();
.getByRole("textbox", { name: "Code Editor" });

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants