Skip to content

test(desktop): make slash caret movement portable - #2964

Merged
Astro-Han merged 1 commit into
apache:mainfrom
xxhZs:fix/slash-command-menu-nonleading
Aug 14, 2026
Merged

test(desktop): make slash caret movement portable#2964
Astro-Han merged 1 commit into
apache:mainfrom
xxhZs:fix/slash-command-menu-nonleading

Conversation

@xxhZs

Copy link
Copy Markdown
Contributor

Summary

  • use the platform-native line-start shortcut in the slash-command menu E2E
  • keep Home on Windows/Linux and use Meta+ArrowLeft on macOS
  • make the caret-in-query assertion deterministic instead of depending on menu update timing

Root cause

The product command filter already rejects a slash when non-whitespace text remains after the caret. The flaky test attempted to place the caret after / with Home followed by ArrowRight. In macOS contentEditable, Home scrolls the document rather than moving to line start, so the caret remained at the end of /side; the assertion only passed when unrelated menu timing temporarily hid the command group.

Verification

  • baseline focused repetition: 15/20 passed
  • fixed focused repetition: 20/20 passed
  • complete slash-command-menu.spec.ts: 4/4 passed
  • Desktop typecheck
  • Biome and git diff --check

Closes#2948

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Astro-Han
Astro-Han merged commit 15b1f8e into apache:mainAug 14, 2026
10 checks passed
Sign up for freeto 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.

flaky e2e: slash-command-menu inline menu shows the 命令 group for a non-leading slash

2 participants

@xxhZs@Astro-Han