Conversation
Install @playwright/test, configure Chromium-only project with Vite dev server integration, add shared editor-setup helper, ESLint overrides for the e2e directory, npm scripts (test:e2e, test:e2e:ui), Makefile targets (test-e2e, test-e2e-ui), and gitignore entries for test artifacts.
Verify the editor initializes and reaches a usable state: visual editor visible, post title wrapper present, block list container rendered, toolbar shown, and default block appender attached. Also test empty editor state and loading with initial block content.
Verify typing text into a new paragraph block, applying bold (Cmd+B), italic (Cmd+I), and combined bold+italic formatting via keyboard shortcuts. Asserts block content attributes contain the expected inline formatting markup.
Verify splitting a paragraph with Enter, merging with Backspace, round-trip content preservation, and inline formatting preservation across split/merge operations.
The help target's grep pattern `[a-zA-Z_-]` excluded digits, so targets containing numbers (e.g. test-e2e) were not listed. Add `0-9` to the character class.
Install Chromium and run Playwright E2E tests alongside the existing JS unit test and lint steps.
Remove S.1 (Write and format text) and S.3 (Merge and split blocks) from the manual smoke tests, as these flows are now covered by the Playwright E2E test suite. Renumber remaining smoke tests.
Vitest was picking up Playwright spec files in e2e/ and failing because Playwright's test.describe() is incompatible with Vitest's test context.
…ugin extend Switch from `plugin:playwright/recommended` to `plugin:@wordpress/eslint-plugin/test-playwright` to align with the upstream Gutenberg E2E linting setup. The WordPress config is currently a thin wrapper around the same Playwright recommended rules, but using it ensures we automatically pick up any Playwright-specific rules WordPress adds in the future.
Add no-restricted-syntax rules to discourage `page.$()`, `page.$$()` and `page.waitForTimeout()` in favor of the locator API. These rules are aligned with the upstream Gutenberg E2E ESLint configuration and help prevent flaky tests.
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.
What?
Adds a Playwright E2E test suite covering core editor flows: loading, text formatting, and block split/merge. Removes the corresponding manual test cases that are now automated.
Why?
GutenbergKit has 40+
@wordpress/*dependencies (5 with patches). The existing unit tests heavily mock these packages, so they can't catch regressions from dependency upgrades. Browser-based E2E tests that load the real editor with real WordPress packages close this gap.How?
setupEditor,getBlocks), ESLint config, npm scripts, and Makefile targetsTesting Instructions
npm cinpx playwright install chromiummake test-e2e— all 11 tests should passmake help— verifytest-e2eandtest-e2e-uiare listedAccessibility Testing Instructions
N/A — no UI changes; this PR adds automated tests only.