test(phase-06): add @ reference e2e scenarios with explainable skip
This commit is contained in:
parent
6fa62cf7cc
commit
27e59dac18
|
|
@ -120,4 +120,35 @@ test.describe("聊天工作台 / 输入区与发送", () => {
|
|||
page.locator(".is-user").filter({ hasText: "重复提交测试" }),
|
||||
).toHaveCount(1);
|
||||
});
|
||||
|
||||
test("DF-INPUT-007 输入@时展示文件候选并可选择为引用 chip", async (
|
||||
{ page },
|
||||
testInfo,
|
||||
) => {
|
||||
skipIfMissingThread(testInfo, THREAD_FOR_WELCOME, "FRONTEND_E2E_THREAD_ID");
|
||||
await openChat(page, reuseThreadChatEntry(THREAD_FOR_WELCOME!));
|
||||
|
||||
const textarea = page.locator("textarea[name='message']");
|
||||
await textarea.click();
|
||||
await textarea.fill("@");
|
||||
|
||||
const dropdown = page.locator("[data-slot='dropdown-menu-content']").first();
|
||||
const items = dropdown.locator("[data-slot='dropdown-menu-item']");
|
||||
const itemCount = await items.count();
|
||||
testInfo.skip(itemCount === 0, "当前线程没有可引用文件候选。");
|
||||
|
||||
await items.first().click();
|
||||
await expect(page.getByLabel("移除引用").first()).toBeVisible();
|
||||
});
|
||||
|
||||
test("DF-INPUT-008 失效引用不会阻断文本发送(可解释 skip)", async (
|
||||
{ page },
|
||||
testInfo,
|
||||
) => {
|
||||
skipIfMissingThread(testInfo, THREAD_FOR_WELCOME, "FRONTEND_E2E_THREAD_ID");
|
||||
await openChat(page, reuseThreadChatEntry(THREAD_FOR_WELCOME!));
|
||||
|
||||
// 该场景依赖特定后端/fixture 能制造 stale 引用;若环境无能力则显式跳过。
|
||||
testInfo.skip(true, "当前 E2E 环境无法稳定注入 stale 引用,使用 hooks 单测覆盖软失败逻辑。");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue