Skip to content

Attachments downloads instead of opening in a new tab #2110

@dkrut

Description

@dkrut

Describe the Bug

After update allure from 2.23.1 to 2.24.0 changed behaviour opening attachments in report. When click to open attachment in new tab, download window opens.
open_attach

Steps to Reproduce

  1. Run test with adding attachment (for example, page source)
  2. Generate report
    allure serve target/allure-results
  3. Open test in a report
  4. Click 'Open attachment in new tab'

Expected Behaviour

Attachment opens in new tab

Screenshots or Additional Context

import io.qameta.allure.Allure;
import org.junit.jupiter.api.Test;

import static com.codeborne.selenide.Selenide.open;
import static com.codeborne.selenide.WebDriverRunner.getWebDriver;

class AllureTest {
    public void attachPageSource() {
        String pageSource = getWebDriver().getPageSource();
        if (!pageSource.isEmpty()) {
            Allure.addAttachment("Page source", "text/html", pageSource, "html");
        }
    }

    @Test
    void attachSource() {
        open("http://google.com");
        attachPageSource();
    }
}

What Language are you using?

Java

What Framework/Allure Integration you are using?

allure-junit5

What version of Allure Integration you are using?

2.24.0

What version of Allure Report you are using?

2.24.0

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions