@@ -24,6 +24,63 @@ test.describe("attachments", () => {
2424 await bootstrap ?. shutdown ?.( ) ;
2525 } ) ;
2626
27+ test . describe ( "commons" , ( ) => {
28+ test . beforeEach ( async ( { page } ) => {
29+ bootstrap = await bootstrapReport ( {
30+ reportConfig : {
31+ name : "Allure report with attachments" ,
32+ appendHistory : true ,
33+ history : [ ] ,
34+ historyPath : "history.jsonl" ,
35+ knownIssuesPath : undefined ,
36+ } ,
37+ testResults : [
38+ {
39+ name : "foo" ,
40+ fullName : "sample.test.js#test with image attachment" ,
41+ historyId : "" ,
42+ status : Status . PASSED ,
43+ stage : Stage . FINISHED ,
44+ start : Date . now ( ) ,
45+ stop : Date . now ( ) + 1000 ,
46+ steps : [
47+ {
48+ name : "bar" ,
49+ status : Status . PASSED ,
50+ stage : Stage . FINISHED ,
51+ parameters : [ ] ,
52+ steps : [ ] ,
53+ statusDetails : { } ,
54+ attachments : [
55+ {
56+ source : "attachment.txt" ,
57+ type : "text/plain" ,
58+ name : "attachment" ,
59+ } ,
60+ ] ,
61+ } ,
62+ ] ,
63+ } ,
64+ ] ,
65+ attachments : [ ] ,
66+ } ) ;
67+
68+ await page . goto ( bootstrap . url ) ;
69+ } ) ;
70+
71+ test ( 'should render "missed" label for attachments which don\'t exist' , async ( { page } ) => {
72+ await treePage . clickNthLeaf ( 0 ) ;
73+ await testResultPage . toggleStepByTitle ( "bar" ) ;
74+
75+ await expect ( testResultPage . testResultAttachmentLocator ) . toHaveCount ( 1 ) ;
76+ await expect (
77+ testResultPage . testResultAttachmentLocator . nth ( 0 ) . getByTestId ( "test-result-attachment-missed" ) ,
78+ ) . toBeVisible ( ) ;
79+
80+ await testResultPage . screenshot ( ) ;
81+ } ) ;
82+ } ) ;
83+
2784 test . describe ( "text attachment" , ( ) => {
2885 test . beforeEach ( async ( { page } ) => {
2986 bootstrap = await bootstrapReport ( {
0 commit comments