refactor(*): 稳定期治理 - 收敛核心架构、错误语义并修复跨项目数据竞态
This commit is contained in:
1 parent
bacd502f5c
commit
b5f3413ded
298 files changed
+12681
-26428
No files matched your search
@@ -81,8 +81,8 @@ test("channel model fetch requires explicit selection before import", async () =
|
||||
]);
|
||||
const component = compactSource(componentSource);
|
||||
|
||||
expect(apiSource).toContain("api.post(`/admin/channels/${encodeURIComponent(channelId)}/models/fetch`)");
|
||||
expect(apiSource).toContain("api.post(`/admin/channels/${encodeURIComponent(channelId)}/models/import`, { models })");
|
||||
expect(apiSource).toContain("http.post<{ models: string[] }>(`/admin/channels/${encodeURIComponent(channelId)}/models/fetch`)");
|
||||
expect(apiSource).toContain("http.post<{ models: string[]; added: number }>(`/admin/channels/${encodeURIComponent(channelId)}/models/import`, { models })");
|
||||
expect(component).toContain('title="选择要导入的模型"');
|
||||
expect(component).toContain("默认已全选");
|
||||
expect(component).toContain("setFetchPreviewOpen(true)");
|
||||
@@ -106,7 +106,7 @@ test("channel model manager supports bounded atomic batch deletion", async () =>
|
||||
const [componentSource, apiSource] = await Promise.all([Bun.file(new URL("../src/pages/admin/components/channel-model-manager.tsx", import.meta.url)).text(), Bun.file(new URL("../src/services/api/wallet.ts", import.meta.url)).text()]);
|
||||
const component = compactSource(componentSource);
|
||||
|
||||
expect(apiSource).toContain("api.post(`/admin/channels/${encodeURIComponent(channelId)}/models/batch-delete`, { modelIds })");
|
||||
expect(apiSource).toContain("http.post<{ deleted: number }>(`/admin/channels/${encodeURIComponent(channelId)}/models/batch-delete`, { modelIds })");
|
||||
expect(component).toContain("<AdminBatchBar count={selectedModelIds.length}");
|
||||
expect(component).toContain("rowSelection:");
|
||||
expect(component).toContain("selectedRowKeys: selectedModelIds");
|
||||
@@ -278,7 +278,7 @@ test("request logs display user credit billing independently from upstream cost"
|
||||
const billingSummary = sourceSection(listSource, "function BillingSummary", "function MediaResult");
|
||||
expect(listSource).toContain('title: "积分计费"');
|
||||
expect(listSource).toContain('title: "请求阶段 / 状态"');
|
||||
expect(listSource).toContain('description="模型生成、状态查询与结果下载;仅计费调用扣除积分"');
|
||||
expect(listSource).toContain('description="模型生成与结果下载记录;仅计费调用扣除积分"');
|
||||
expect(billingSummary).toContain("billingAmountMicrocredits");
|
||||
expect(billingSummary).toContain("billingAvailable");
|
||||
expect(billingSummary).toContain("!log.billable");
|
||||
|
||||
Reference in new issue
Block a user