@@ -1505,6 +1505,39 @@ test('merge-reports should throw if report version is from the future', async ({
1505
1505
1506
1506
} ) ;
1507
1507
1508
+ test ( 'merge-reports should merge old attachments (pre-1.53)' , async ( { runInlineTest, mergeReports } ) => {
1509
+ const reportDir = test . info ( ) . outputPath ( 'blob-report' ) ;
1510
+
1511
+ const files = {
1512
+ 'playwright.config.ts' : `
1513
+ module.exports = {
1514
+ reporter: [['blob']]
1515
+ };
1516
+ ` ,
1517
+ 'tests/a.test.js' : `
1518
+ import { test, expect } from '@playwright/test';
1519
+ test('test 1', async ({}) => {});
1520
+ ` ,
1521
+ 'merge.config.ts' : `module.exports = {
1522
+ testDir: 'mergeRoot',
1523
+ };` ,
1524
+ } ;
1525
+
1526
+ await runInlineTest ( files ) ;
1527
+ const reportFiles = await fs . promises . readdir ( reportDir ) ;
1528
+ expect ( reportFiles ) . toEqual ( [ 'report.zip' ] ) ;
1529
+
1530
+ await fs . promises . copyFile ( path . join ( __dirname , '../assets/blob-1.52.zip' ) , path . join ( reportDir , 'blob-1.42.zip' ) ) ;
1531
+
1532
+ const { exitCode } = await mergeReports ( reportDir , { 'PLAYWRIGHT_HTML_OPEN' : 'never' } , { additionalArgs : [ '--reporter' , 'html' , '--config' , 'merge.config.ts' ] } ) ;
1533
+ expect ( exitCode ) . toBe ( 0 ) ;
1534
+
1535
+ const assets = await fs . promises . readdir ( path . join ( test . info ( ) . outputPath ( 'playwright-report' ) , 'data' ) ) ;
1536
+ expect ( new Set ( assets ) ) . toEqual ( new Set ( [
1537
+ '4b6deb4234e5c2dc92efc6e604624e9481e8ae57.png' , // screenshot
1538
+ ] ) ) ;
1539
+ } ) ;
1540
+
1508
1541
test ( 'should merge blob reports with same name' , async ( { runInlineTest, mergeReports, showReport, page } ) => {
1509
1542
const files = {
1510
1543
'playwright.config.ts' : `
0 commit comments