test: migrate frontend specs to Playwright (ether/etherpad#7622)#167
Merged
JohnMcLear merged 1 commit intomasterfrom Apr 28, 2026
Merged
test: migrate frontend specs to Playwright (ether/etherpad#7622)#167JohnMcLear merged 1 commit intomasterfrom
JohnMcLear merged 1 commit intomasterfrom
Conversation
The legacy static/tests/frontend/specs/test.js used mocha + the in-page jQuery `helper.padChrome$` runner, which was removed from core in 2023 (commit cc80db2d3) without a Playwright replacement. Since then this file has been silently dead — every CI run of this plugin's frontend-tests workflow ran *core's* specs with this plugin loaded, never the assertions in this file. Migrate to Playwright. The new file lives at the conventional location ether/etherpad#7623 introduces: static/tests/frontend-new/specs/headings.spec.ts Core's playwright config now auto-discovers any installed plugin's specs at that path. Once that PR lands and a new ep_headings2 release ships, these tests will start running in: - This plugin's own frontend-tests CI (against core+plugin). - Core's chrome-with-plugins CI (PR #7609). The three migrated tests mirror the original assertions: - Heading select has aria-label for accessibility - Focus returns to editor after selecting a heading - Option select is changed when heading is changed The legacy file is removed because it never executed and would otherwise bit-rot further (existing aria-label text already drifted between this file and the plugin's actual select element — a divergence the dead test couldn't catch). **Change type:** patch (test-only).
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.
Migrates the legacy mocha+helper frontend specs to Playwright, fitting the new plugin-test-discovery convention proposed in ether/etherpad#7622 / PR ether/etherpad#7623.
Change type: patch (test-only; no production code change).
Why
static/tests/frontend/specs/test.jshas been silently dead since core's commitcc80db2d3(2023-07-02) removed the in-page jQuery test runner. Every CI run of this plugin'sFrontend testsworkflow has actually been executing core's specs with this plugin loaded — the assertions in this file have never run.ether/etherpad#7623 adds a Playwright
testMatchglob that auto-discovers plugin specs atstatic/tests/frontend-new/specs/**/*.spec.ts. Migrating to that location restores execution.What's in this PR
New:
static/tests/frontend-new/specs/headings.spec.ts— three Playwright tests mirroring the originals:aria-labelfor accessibilityRemoved:
static/tests/frontend/specs/test.js— dead since 2023, removed to prevent further bit-rot. (Thearia-labelassertion in the dead file already drifted from the plugin's actual<select>markup at one point — exactly the kind of divergence a dead test can't catch.)The new file uses
import {goToNewPad, ...} from 'ep_etherpad-lite/tests/frontend-new/helper/padHelper'—ep_etherpad-liteis symlinked intonode_modulesby the workspace, so the import resolves anywhere this plugin is installed alongside core.Test plan
chrome-with-pluginsjob will start running these 3 specs as part of its run.frontend-tests.ymlworkflow will likewise pick them up automatically (no workflow change needed — the workflow already callspnpm run test-ui, which now discovers the new path).🤖 Generated with Claude Code