From cd8f29ea63d1df760c926d514b278c095630acf7 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Tue, 1 Dec 2026 09:14:14 +0800 Subject: [PATCH] fix(ci): restore Windows clippy and Mermaid preview tests (#7132) --- crates/ide-dap/src/native.rs | 1 + e2e/editor.spec.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/crates/ide-dap/src/native.rs b/crates/ide-dap/src/native.rs index 040753e65a..243b55e682 100644 --- a/crates/ide-dap/src/native.rs +++ b/crates/ide-dap/src/native.rs @@ -103,6 +103,7 @@ fn convert(config: &mut LaunchConfig, to: &str) -> IdeResult<()> { mod tests { use super::*; use std::collections::BTreeMap; + #[cfg(unix)] use std::path::Path; fn cmake_launch() -> LaunchConfig { diff --git a/e2e/editor.spec.ts b/e2e/editor.spec.ts index 92ba08b328..42af04a293 100644 --- a/e2e/editor.spec.ts +++ b/e2e/editor.spec.ts @@ -610,6 +610,8 @@ test("keeps diagrams and their math labels when editing or switching Markdown ta ].join("\n\n"); await page.keyboard.insertText(source); const preview = page.getByRole("document", { name: "Markdown preview" }); + // Mermaid rendering is deferred while editing the source. + await preview.focus(); const diagram = preview.locator(".mermaid-output .pan-zoom-content > svg"); await expect(diagram.locator("foreignObject math")).toHaveCount(1); const original = await diagram.elementHandle(); @@ -623,6 +625,7 @@ test("keeps diagrams and their math labels when editing or switching Markdown ta await content.press("Meta+a"); await page.keyboard.insertText(source.replace("$$x^2$$", () => "$$z^3$$")); + await preview.focus(); await expect(diagram.locator("foreignObject math mi")).toHaveText("z"); const edited = await diagram.elementHandle(); expect(await diagram.evaluate((svg, old) => svg === old, original)).toBe(false); @@ -673,6 +676,7 @@ test("Markdown preview aligns Mermaid diagrams to their container align attribut ); const preview = page.getByRole("document", { name: "Markdown preview" }); + await preview.focus(); const outputs = preview.locator("[data-mermaid-state='ok'] .mermaid-output"); await expect(outputs).toHaveCount(4);