Skip to content

Serenity version 4.2.34 All screenshots are opening on index 0 #3685

@petrstoudek

Description

@petrstoudek

What happened?

After updating to Serenity Core version 4.2.34, opening any screenshot from the Serenity reporting page always displays screenshot number 1, regardless of which screenshot is selected.

Analysis

This issue appears to be related to the Swiper JS package, which is unable to parse the query parameter from the URL.

example
./d1f4e4d79b98534c7eb605948b73dc9d3b3a1c0424f12325e4fdb73b5e638c40_screenshots.html#screenshots?screenshot=9

The screenshot URLs are generated in the default.ftl file in the serenity-report-resources package and include #screenshots in the URL.

I was able to fix this issue by manually modifying generated html report by removing #screenshots from the URLs. After this change swiper is able to parse the query parameter and opens the correct screenshot.

Note

I'm not sure if this simple change have any side effects anywhere else.

What did you expect to happen?

Clicking on any screenshot should redirect me to that particular screenshot.

Serenity BDD version

4.2.34

JDK version

21

Execution environment

No response

How to reproduce the bug.

Run any UI test cases. Click on any screenshot which is not the first one.

How can we make it happen?

Work on this myself and propose a PR (with Serenity BDD team guidance)

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