From d3fa46536ad2571c0491c6d4a9e6a5b10e89b257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9Fsir=E7=88=B1=E6=95=B0=E7=A0=81?= <66911217+jiangsir-tech@users.noreply.github.com> Date: Wed, 12 Aug 2026 11:01:35 +0800 Subject: [PATCH] Stabilize move pill debounce test --- .../CodexNotesProbeTests/PlainMarkdownTextViewTests.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Tests/CodexNotesProbeTests/PlainMarkdownTextViewTests.swift b/Tests/CodexNotesProbeTests/PlainMarkdownTextViewTests.swift index 5a2716b..026a605 100644 --- a/Tests/CodexNotesProbeTests/PlainMarkdownTextViewTests.swift +++ b/Tests/CodexNotesProbeTests/PlainMarkdownTextViewTests.swift @@ -2304,8 +2304,12 @@ final class PlainMarkdownTextViewTests: XCTestCase { harness.textView.setSelectedRange((text as NSString).range(of: "显示")) runMainLoop(for: 0.05) XCTAssertNil(harness.textView.visibleSelectionMovePill) - runMainLoop(for: 0.15) - XCTAssertNotNil(harness.textView.visibleSelectionMovePill) + XCTAssertTrue( + waitUntil(timeout: 1) { + harness.textView.visibleSelectionMovePill != nil + }, + "Move pill did not appear after the debounce interval." + ) } func testSelectionToolbarUsesCompactLayoutAndAccessibleActions() throws {