feat: unify drainage targets and carrier status UI
This commit is contained in:
@@ -13,6 +13,17 @@ describe('ReportMaterialsService', () => {
|
||||
expect(operationLog.create).toHaveBeenCalledWith({ data: expect.objectContaining({ userId: 'operator-1' }) });
|
||||
});
|
||||
|
||||
it('builds a drainage template without a separate site-name column', async () => {
|
||||
const operationLog = { create: jest.fn().mockResolvedValue({ id: 'log-drainage-template' }) };
|
||||
const service = new ReportMaterialsService({ operationLog } as never, {} as never, {} as never);
|
||||
const exported = await service.buildOfficialTemplate('drainage', 'operator-1');
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
await workbook.xlsx.load(exported.content as never);
|
||||
const headers = workbook.worksheets[0].getRow(1).values;
|
||||
expect(headers).toEqual(expect.arrayContaining(['短信签名', '引流 URL 或号码', '备注', '主体证明']));
|
||||
expect(headers).not.toEqual(expect.arrayContaining(['站点名称']));
|
||||
});
|
||||
|
||||
it('rejects formula cells before storing or importing a workbook', async () => {
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
const sheet = workbook.addWorksheet('签名资料');
|
||||
|
||||
Reference in New Issue
Block a user