From bb5bd12ddf0ade981321bf4b1af26de3fd8e8172 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Thu, 5 Oct 2023 18:14:58 +0100 Subject: [PATCH] fix html attachments in single file mode (fixes #2121, via #2140) --- .../src/main/javascript/components/attachment/AttachmentView.js | 2 +- allure-generator/src/main/resources/tpl/index.html.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/allure-generator/src/main/javascript/components/attachment/AttachmentView.js b/allure-generator/src/main/javascript/components/attachment/AttachmentView.js index c0fc6b56b..f44a6c7f4 100644 --- a/allure-generator/src/main/javascript/components/attachment/AttachmentView.js +++ b/allure-generator/src/main/javascript/components/attachment/AttachmentView.js @@ -24,7 +24,7 @@ class AttachmentView extends View { onRender() { if (!this.sourceUrl) { - reportDataUrl(`data/attachments/${this.attachment.source}`) + reportDataUrl(`data/attachments/${this.attachment.source}`, this.attachment.type) .then((sourceUrl) => { this.sourceUrl = sourceUrl; }) diff --git a/allure-generator/src/main/resources/tpl/index.html.ftl b/allure-generator/src/main/resources/tpl/index.html.ftl index fb49c15d6..48aba1d86 100644 --- a/allure-generator/src/main/resources/tpl/index.html.ftl +++ b/allure-generator/src/main/resources/tpl/index.html.ftl @@ -44,7 +44,7 @@ window.reportDataReady = false; window.reportData = window.reportData || {}; function d(name, value){ - return new Promise(function (resolve) {console.log(name);window.reportData[name] = value;resolve(true)}); + return new Promise(function (resolve) {window.reportData[name] = value;resolve(true)}); }