import { expect, test } from "@playwright/test"; import path from "node:path"; import { captureNativeWorkflowState, exposeWebTools, observeNative } from "../fixtures/native-ui-workflow"; test("probe: capture the Monkey add failure detail", async ({ page }) => { test.setTimeout(120_000); await observeNative(page); await page.goto("/"); await page.getByTestId("blend-file-input").setInputFiles(path.resolve(import.meta.dirname, "../../../tests/files/web/basic_scene.blend")); await expect(page.getByTestId("engine-status")).toContainText(/SceneIR r\d+/, { timeout: 60_000 }); await exposeWebTools(page); await page.getByRole("button", { name: "添加", exact: true }).click(); await page.getByRole("menuitem", { name: "网格", exact: true }).click(); await page.getByRole("menuitem", { name: "猴头", exact: true }).click(); await page.waitForTimeout(5000); const state = await captureNativeWorkflowState(page); console.log("PROBE_STATE " + JSON.stringify({ engineStatus: state.engineStatus, diagnosticDetail: state.diagnosticDetail, python: state.python, main: state.main, outlinerText: await page.locator(".outliner-area, [aria-label='Outliner']").first().innerText().catch(() => ""), responses: state.responses, gpuFailure: state.gpuFailure, browserDiagnostics: state.browserDiagnostics, console: state.console, }, null, 2).slice(0, 12000)); });