Skip to content

[1254] 增加基于 pynput 的端到端自动化测试并完善各级标题插入支持 - #4478

Merged
da-liii merged 2 commits into
mainfrom
da/1254/pytest
Sep 2, 2026
Merged

[1254] 增加基于 pynput 的端到端自动化测试并完善各级标题插入支持#4478
da-liii merged 2 commits into
mainfrom
da/1254/pytest

Conversation

@da-liii

@da-liii da-liii commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

任务简述

关联任务文档:devel/1254.md

改动内容

  1. 端到端自动化测试
    • 新增 TeXmacs/tests/python/1254.py,基于 pynput 模拟键鼠交互,覆盖从 chaptersectionsubsectionsubsubsectionparagraphsubparagraph 各级标题内部插入同级与跨级标题的完整流程,并校验 AST 树独立性与完整性。
  2. 快捷键与菜单支持
    • text-kbd.scmtext-menu.scm 中将 paragraphsubparagraphappendix 接入 smart-insert-heading,确保在标题内部触发插入时均能先退出结构并换行。
  3. 集成测试增强
    • TeXmacs/tests/1254.scm 增加 chapterparagraphsubparagraph 的连续嵌套测试用例。
  4. 任务文档更新
    • 参照 1257.md 更新 devel/1254.md 中的手动与自动化测试步骤说明。

本地测试

xmake b smart-heading-test && xmake r smart-heading-test
MOGAN_TEST_GUI=1 xmake r 1254
python3 TeXmacs/tests/python/1254.py

所有测试均已本地通过。

@da-liii
da-liii merged commit 5802a23 into main Sep 2, 2026
5 checks passed
@da-liii
da-liii deleted the da/1254/pytest branch September 2, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant