feat(08-05-business-detail-routing): 完成采购与资产独立路由
这个提交包含在:
@@ -139,8 +139,10 @@ async function createAsset(page: Page, categoryName: string, suffix: string, ind
|
||||
const asset = payload.data?.asset;
|
||||
const assetNo = String(asset?.assetNo || "");
|
||||
expect(assetNo).toMatch(config.prefix);
|
||||
await page.goto(`/assets?id=${asset.id}`);
|
||||
await page.goto(`/assets/${asset.id}`);
|
||||
await expect(page.getByTestId("asset-name")).toHaveValue(name, { timeout: 30_000 });
|
||||
await page.getByRole("button", { name: "返回资产列表", exact: true }).click();
|
||||
await expect(page).toHaveURL(/\/assets$/);
|
||||
await page.getByPlaceholder("搜索编号/名称/hash/VER").fill(assetNo);
|
||||
await expect(page.getByTestId("asset-row").filter({ hasText: assetNo })).toBeVisible({ timeout: 30_000 });
|
||||
|
||||
|
||||
@@ -1016,7 +1016,7 @@ test(`${trialrunIssueId} 浏览器业务先行试运行:报销、审批、请
|
||||
throw new Error(`创建采购申请后未返回 id: ${JSON.stringify(createPayload)}`);
|
||||
}
|
||||
state.purchaseRequestId = purchaseRequestId;
|
||||
await page.goto(`/purchase-requests?id=${purchaseRequestId}`);
|
||||
await page.goto(`/purchase-requests/${purchaseRequestId}`);
|
||||
await expect(page.getByTestId("purchase-title")).toBeVisible();
|
||||
await page.getByTestId("purchase-title").fill(`${trialrunMarkerPrefix} 浏览器采购 ${marker}`);
|
||||
await selectFirstEnabledOption(page.getByTestId("purchase-legal-entity"));
|
||||
@@ -1075,7 +1075,7 @@ test(`${trialrunIssueId} 浏览器业务先行试运行:报销、审批、请
|
||||
}
|
||||
|
||||
const employeeAgain = await loginRole(page, "employee");
|
||||
await page.goto(`/purchase-requests?id=${purchaseRequestId}`);
|
||||
await page.goto(`/purchase-requests/${purchaseRequestId}`);
|
||||
await expect(page.getByTestId("purchase-detail-status")).toContainText(/已通过|approved|已完成/, { timeout: 30_000 });
|
||||
await expect(page.getByTestId("purchase-approval-history")).toContainText(/通过|approve|approved/, { timeout: 30_000 });
|
||||
await expect(page.locator("tr").filter({ hasText: purchaseAttachmentName }).first()).toBeVisible({ timeout: 30_000 });
|
||||
|
||||
在新工单中引用
屏蔽一个用户