fix(editor): ci stability (#14704)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Improved Electron shutdown, diagnostics and tab teardown for more
reliable exits and forced cleanup on stubborn processes.
* **Tests**
* Added polling-based test helpers, stronger scroll/page readiness,
timeout-tolerant page selection, and async cleanup/worker teardown;
updated many tests to wait for UI/model updates and rendering frames.
* **Bug Fixes**
* Reduced flakiness by awaiting paragraph visibility, nested counts,
selection/navigation stability, tab counts, post-action renders, and
safer element interactions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-03-23 16:25:15 +08:00
committed by GitHub
parent 8ba02ed6fb
commit dcf041a3f2
17 changed files with 619 additions and 256 deletions

View File

@@ -31,6 +31,7 @@ import {
redoByClick,
redoByKeyboard,
resetHistory,
setInlineRangeInInlineEditor,
setSelection,
SHORT_KEY,
switchReadonly,
@@ -87,10 +88,9 @@ test('init paragraph by page title enter in middle', async ({ page }) => {
await waitDefaultPageLoaded(page);
await focusTitle(page);
await type(page, 'hello');
await page.keyboard.press('ArrowLeft');
await page.keyboard.press('ArrowLeft');
await page.keyboard.press('ArrowLeft');
await setInlineRangeInInlineEditor(page, { index: 2, length: 0 });
await pressEnter(page);
await waitNextFrame(page, 200);
await assertTitle(page, 'he');
await assertRichTexts(page, ['llo', '']);