diff --git a/pkg/allure/attachment.go b/pkg/allure/attachment.go index d4f0aa3..8412f7f 100644 --- a/pkg/allure/attachment.go +++ b/pkg/allure/attachment.go @@ -43,7 +43,8 @@ const ( Webm MimeType = "video/webm" Mpeg MimeType = "video/mpeg" - Pdf MimeType = "application/pdf" + Pdf MimeType = "application/pdf" + Xlsx MimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ) var mimeTypeMap = map[MimeType]string{ @@ -67,6 +68,7 @@ var mimeTypeMap = map[MimeType]string{ Webm: "webm", Mpeg: "mpeg", Pdf: "pdf", + Xlsx: "xlsx", } // NewAttachment - Constructor. Returns pointer to new attachment object. diff --git a/pkg/allure/attachment_test.go b/pkg/allure/attachment_test.go index 792c1fd..eed4a94 100644 --- a/pkg/allure/attachment_test.go +++ b/pkg/allure/attachment_test.go @@ -85,6 +85,7 @@ func TestMimeTypeMap(t *testing.T) { Webm: "webm", Mpeg: "mpeg", Pdf: "pdf", + Xlsx: "xlsx", } assert.Equal(t, len(_mimeTypeMap), len(mimeTypeMap), "Miss Some!") for _type, _format := range _mimeTypeMap { @@ -152,5 +153,8 @@ func TestMimeTypeMap(t *testing.T) { var _Pdf MimeType = "application/pdf" assert.Equal(t, _Pdf, Pdf) + + var _Xlsx MimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + assert.Equal(t, _Xlsx, Xlsx) }) }