Browse Source

chore(s0): mark supplier UI regression resolved

YY968XX 2 months ago
parent
commit
566900058b
1 changed files with 6 additions and 22 deletions
  1. 6 22
      Web/tests/e2e/s0/a2-ui-batch2.spec.ts

+ 6 - 22
Web/tests/e2e/s0/a2-ui-batch2.spec.ts

@@ -2,9 +2,12 @@ import { test, expect } from '../fixtures/auth';
 import type { Page, Response } from '@playwright/test';
 
 /**
- * A2 UI 回归 第二批:Material / Supplier
+ * A2 UI 回归 第二批:Material
  * Material:通过 routing-op-details 反查找到必有引用的样本 → 实测删除拦截
- * Supplier:唯一下游 SRM 列表接口 S01999 不可用,无法稳妥定位"必有引用"样本,标 Block
+ *
+ * Supplier UI 回归已迁移至 srm-fix-regression.spec.ts:使用 Supp=10001875 + SRM 引用样本
+ * 验证删除 409 / S01006 拦截。BUG-S0-SRMPURCHASE-SCHEMA-MISMATCH(commit 50359ac3)已修复,
+ * 原"SRM 不可用"Block 标记已废弃。
  */
 
 async function token(page: Page) {
@@ -92,23 +95,4 @@ test('Material 删除被工艺引用 → 409 + 红色 toast + 行未消失', asy
   await expect(authedPage.locator('tr', { hasText: sample!.itemNum }).first()).toBeVisible({ timeout: 3_000 });
 });
 
-test('Supplier UI 回归 → Block(样本不足)', async ({ authedPage }) => {
-  // 唯一下游 SRM 接口 S01999 schema mismatch,Reference checker 走 SafeCount 兜底为 0
-  // 任何 Supplier DELETE 都会被放行 → 盲删风险高,按要求标 Block,不执行删除
-  await authedPage.goto('/#/dashboard/home', { waitUntil: 'domcontentloaded' });
-  const tk = await token(authedPage);
-  const r = await authedPage.request.get(
-    `${new URL(authedPage.url()).origin}/api/s0/supply/srm-purchases?page=1&pageSize=1&tenantId=1&factoryId=1`,
-    { headers: { Authorization: `Bearer ${tk!}` } },
-  );
-  const body = await r.json().catch(() => null);
-  test.info().annotations.push({
-    type: 'block-reason',
-    description: `SRM 列表接口 HTTP ${r.status()} body=${JSON.stringify(body).slice(0, 200)}`,
-  });
-  test.info().annotations.push({
-    type: 'impact',
-    description: 'SRM SafeCount 兜底为 0 → Supplier DELETE 会被放行 → 任何运行态删除都不安全;BUG-S0-SRMPURCHASE-SCHEMA-MISMATCH 修复前不做 UI 回归',
-  });
-  test.skip(true, 'Supplier 下游 SRM 不可用,标 Block;详见 annotations');
-});
+// Supplier UI 回归不再放在本文件;见 srm-fix-regression.spec.ts。