feat(web-platform): release V0.9.3 全模块界面重构
web-platform-ci / TypeScript, lint, unit, build (push) Has been cancelled
web-platform-ci / Playwright E2E (push) Has been cancelled

This commit is contained in:
2026-09-08 17:57:57 +08:00
parent 831d0b95bb
commit 13e35be98b
124 changed files with 5182 additions and 2141 deletions
+7 -2
View File
@@ -63,7 +63,7 @@ test('训练作业一键导入:真实WASM地图+97维ORT+PiP+射线开关', as
.locator('input[type="file"]')
.first()
.setInputFiles({ name: 'go2.xml', mimeType: 'text/xml', buffer: Buffer.from(go2) });
await expect(page.getByText('WASM 已加载')).toBeVisible({ timeout: 30_000 });
await expect(page.getByRole('button', { name: '▶ 播放' })).toBeEnabled({ timeout: 30_000 });
await page.getByRole('tab', { name: '控制台' }).click();
const tools = page.getByRole('tabpanel', { name: '控制台' });
await tools.getByRole('button', { name: /强化学习任务/ }).click();
@@ -82,6 +82,7 @@ test('训练作业一键导入:真实WASM地图+97维ORT+PiP+射线开关', as
if ((await section.getAttribute('aria-expanded')) === 'false') await section.click();
await expect(tools.getByText('97 / 12')).toBeVisible();
await expect(tools.getByText('Go2 前视射线避障导航', { exact: true })).toBeVisible();
await tools.getByText('推理详情', { exact: true }).click();
const count = tools.getByText('推理次数', { exact: true }).locator('..');
await expect
.poll(async () => Number((await count.textContent())?.replace(/\D/g, '')))
@@ -90,7 +91,9 @@ test('训练作业一键导入:真实WASM地图+97维ORT+PiP+射线开关', as
if (await pause.isVisible()) await pause.click();
const stop = tools.getByRole('button', { name: '停止', exact: true });
if (await stop.isVisible()) await stop.click();
const targetRow = tools.getByText('当前目标 (X, Y)', { exact: true }).locator('..');
await section.evaluate((element) => element.scrollIntoView({ block: 'start' }));
await page.screenshot({ path: test.info().outputPath('onnx-policy.png') });
const targetRow = tools.getByText('当前目标 (X, Y) m', { exact: true }).locator('..');
const initialTarget = await targetRow.textContent();
const selection = () => page.locator('[aria-selected="true"]').allTextContents();
const beforeSelection = await selection();
@@ -139,6 +142,7 @@ test('训练作业一键导入:真实WASM地图+97维ORT+PiP+射线开关', as
await tools.getByRole('button', { name: '导入策略' }).click();
await expect(tools.getByRole('alert')).toContainText('维度');
await expect(tools.getByText('97 / 12')).toBeVisible();
await page.screenshot({ path: test.info().outputPath('onnx-contract-error.png') });
await expect(targetRow).toHaveText(initialTarget!);
await tools.getByRole('button', { name: '设定目标', exact: true }).click();
await tools.getByRole('button', { name: '卸载', exact: true }).click();
@@ -148,6 +152,7 @@ test('训练作业一键导入:真实WASM地图+97维ORT+PiP+射线开关', as
await expect(tools.locator('.uplot canvas')).toHaveCount(1);
await tools.getByRole('tab', { name: '综合', exact: true }).click();
await expect(tools.locator('.uplot canvas')).toHaveCount(5);
await page.screenshot({ path: test.info().outputPath('training-metrics.png') });
await tools.getByRole('button', { name: /训练指标趋势/ }).click();
await expect(tools.locator('.uplot')).toHaveCount(0);
});