fix(e2e): 修复5个staging E2E失败用例
Deploy / Staging E2E Tests (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 120h50m30s
CI/CD Pipeline / Frontend Lint (push) Failing after 120h51m6s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 120h51m6s
Deploy / Staging E2E Tests (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 120h50m30s
CI/CD Pipeline / Frontend Lint (push) Failing after 120h51m6s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 120h51m6s
- core-generation: 修复历史页面标题(任务中心→任务历史)+ 增加describe超时
- core-titles: 登录改用loginWithRetry + 创建标题状态码200→201 + 增加describe超时
- subscription: 所有describe增加120s超时 + 修复取消订阅错误消息提取(适配{error:{message}}格式)
This commit is contained in:
@@ -60,6 +60,7 @@ type GenerationTaskResponse = {
|
||||
};
|
||||
|
||||
test.describe("Core generation flow", () => {
|
||||
test.describe.configure({ timeout: 180_000 });
|
||||
test("generates a video and shows result in product library", async ({
|
||||
page,
|
||||
request,
|
||||
@@ -230,7 +231,7 @@ test.describe("Core generation flow", () => {
|
||||
|
||||
// Navigate to history page
|
||||
await page.goto("/app/history");
|
||||
await expect(page.getByText("任务中心")).toBeVisible({ timeout: 20_000 });
|
||||
await expect(page.getByText("任务历史")).toBeVisible({ timeout: 20_000 });
|
||||
await expect(page.getByText("全部")).toBeVisible();
|
||||
});
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ async function loginWithRetry(
|
||||
}
|
||||
|
||||
test.describe("Title library flow", () => {
|
||||
test.describe.configure({ timeout: 120_000 });
|
||||
test("loads title library page and displays titles", async ({
|
||||
page,
|
||||
request,
|
||||
@@ -116,9 +117,7 @@ test.describe("Title library flow", () => {
|
||||
});
|
||||
expect(register.status()).toBe(201);
|
||||
|
||||
const login = await request.post(`${apiBase}/auth/login`, {
|
||||
data: { email, password: PASSWORD },
|
||||
});
|
||||
const login = await loginWithRetry(request, email, PASSWORD);
|
||||
expect(login.status()).toBe(200);
|
||||
const loginData = (await login.json()) as { access_token: string };
|
||||
const headers = { Authorization: `Bearer ${loginData.access_token}` };
|
||||
@@ -132,7 +131,7 @@ test.describe("Title library flow", () => {
|
||||
category: "default",
|
||||
},
|
||||
});
|
||||
expect(createResp.status(), await createResp.text()).toBe(200);
|
||||
expect(createResp.status(), await createResp.text()).toBe(201);
|
||||
const created = (await createResp.json()) as {
|
||||
id: string;
|
||||
text: string;
|
||||
|
||||
@@ -58,6 +58,7 @@ async function createAuthedUser(request: any, label: string) {
|
||||
}
|
||||
|
||||
test.describe("Subscription route guard", () => {
|
||||
test.describe.configure({ timeout: 120_000 });
|
||||
test("redirects anonymous users to login", async ({ page }) => {
|
||||
await page.goto("/app/subscription");
|
||||
await expect(page).toHaveURL(/\/login/);
|
||||
@@ -65,6 +66,7 @@ test.describe("Subscription route guard", () => {
|
||||
});
|
||||
|
||||
test.describe("订阅信息查看", () => {
|
||||
test.describe.configure({ timeout: 120_000 });
|
||||
test("获取当前订阅信息 - 正向", async ({ request }) => {
|
||||
const { headers } = await createAuthedUser(request, "sub-info");
|
||||
|
||||
@@ -89,6 +91,7 @@ test.describe("订阅信息查看", () => {
|
||||
});
|
||||
|
||||
test.describe("订阅降级", () => {
|
||||
test.describe.configure({ timeout: 120_000 });
|
||||
test("Pro 用户降级到 Standard - 正向", async ({ request }) => {
|
||||
const { headers } = await createAuthedUser(request, "sub-downgrade");
|
||||
|
||||
@@ -163,6 +166,7 @@ test.describe("订阅降级", () => {
|
||||
});
|
||||
|
||||
test.describe("订阅过期处理", () => {
|
||||
test.describe.configure({ timeout: 120_000 });
|
||||
test("取消订阅 - 反向(免费用户)", async ({ request }) => {
|
||||
const { headers } = await createAuthedUser(request, "sub-cancel");
|
||||
|
||||
@@ -174,7 +178,7 @@ test.describe("订阅过期处理", () => {
|
||||
// 免费用户可能不需要取消,返回 400 或类似错误
|
||||
if (!response.ok()) {
|
||||
const data = await response.json();
|
||||
expect(data.detail || data.message, "应返回错误信息").toBeTruthy();
|
||||
expect(data.error?.message || data.detail || data.message, "应返回错误信息").toBeTruthy();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -230,6 +234,7 @@ test.describe("订阅过期处理", () => {
|
||||
});
|
||||
|
||||
test.describe("账单记录", () => {
|
||||
test.describe.configure({ timeout: 120_000 });
|
||||
test("获取账单记录 - 正向", async ({ request }) => {
|
||||
const { headers } = await createAuthedUser(request, "sub-bills");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user