Add KOC resource filters and export
This commit is contained in:
@@ -250,6 +250,25 @@ test("exports complete task recovery data to Excel with embedded images", async
|
||||
assert.match(workbook, /oneCellAnchor/);
|
||||
});
|
||||
|
||||
test("filters and exports the current KOC resource result set", async () => {
|
||||
const [adminApp, exportRoute, workbook] = await Promise.all([
|
||||
readFile(new URL("../app/admin-app.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../app/api/resources-export/route.ts", import.meta.url), "utf8"),
|
||||
readFile(new URL("../lib/recovery-workbook.ts", import.meta.url), "utf8"),
|
||||
]);
|
||||
|
||||
assert.match(adminApp, /搜索账号名称 \/ 账号ID/);
|
||||
assert.match(adminApp, /全部IP地区/);
|
||||
assert.match(adminApp, /全部合作来源/);
|
||||
assert.match(adminApp, /导出筛选结果/);
|
||||
assert.match(adminApp, /filteredAccounts\.map\(\(item\) => item\.account\.id\)/);
|
||||
assert.match(exportRoute, /小红书号\/抖音号/);
|
||||
assert.match(exportRoute, /历史合作来源/);
|
||||
assert.match(exportRoute, /合作社资源 · 不可直联/);
|
||||
assert.match(exportRoute, /isAdminRequest/);
|
||||
assert.match(workbook, /relationships\/hyperlink/);
|
||||
});
|
||||
|
||||
test("supports anonymous partner delegation without creating a second data flow", async () => {
|
||||
const [
|
||||
adminApp,
|
||||
|
||||
Reference in New Issue
Block a user