Skip to content

Commit 1434101

Browse files
DavertMikclaude
andcommitted
fix(test): vendor CodeMirror 6 bundle so richtext tests don't depend on esm.sh
The CodeMirror 6 rich-text fixture imported codemirror@6.0.1 from esm.sh, which fans out to the entire @codemirror/* + @lezer/* module graph over many serial requests. In CI this reliably exceeded the 30s waitForFunction timeout, so window.__editorReady never became true and all four CodeMirror 6 fillField tests timed out across Playwright, Puppeteer and WebDriver. Pre-existing on 4.x and unrelated to the junit change on this branch. Vendor the self-contained esm.sh bundle locally and import it same-origin, making the test network-independent and deterministic. Exclude the vendored blob from eslint and prettier. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5a6b7d2 commit 1434101

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Vendored third-party bundles used by rich-text editor test fixtures
2+
test/data/app/js/

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const compat = new FlatCompat({
1414

1515
export default [
1616
{
17-
ignores: ['test/data/output', 'lib/css2xpath/*'],
17+
ignores: ['test/data/output', 'test/data/app/js/*', 'lib/css2xpath/*'],
1818
},
1919
{
2020
languageOptions: {

test/data/app/js/codemirror6.js

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/data/app/view/form/richtext/codemirror6.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<button type="submit" id="submit">Submit</button>
1515
</form>
1616
<script type="module">
17-
import { EditorView, minimalSetup } from 'https://esm.sh/codemirror@6.0.1'
17+
import { EditorView, minimalSetup } from '/js/codemirror6.js'
1818
const initial = <?php echo json_encode($initial, JSON_UNESCAPED_UNICODE); ?>;
1919
const view = new EditorView({
2020
doc: initial,

0 commit comments

Comments
 (0)