feat: implement HTML report generation in MobileTestReporter

This commit is contained in:
张翔
2026-03-05 16:01:27 +08:00
parent 8a43c0f5c2
commit 597a39d3ec
2 changed files with 66 additions and 0 deletions
@@ -0,0 +1,16 @@
import { test, expect } from '@playwright/test';
import { MobileTestReporter } from '../../utils/MobileTestReporter';
test('MobileTestReporter should generate HTML report', async () => {
const reporter = new MobileTestReporter({} as any);
const html = reporter.generateHtmlReport({
suites: [],
duration: 10000,
status: 'passed',
} as any);
expect(html).toContain('移动端测试报告');
expect(html).toContain('总测试数');
expect(html).toContain('通过');
expect(html).toContain('失败');
});