cucumber / cucumber/react-components

Anchor links don't select the targeted test on load

Open
#422 0 comments 0 reactions 1 assignee Claimed by @davidjgoss View on GitHub
:bug: bug
Dominant language
TypeScript
Stars
38
Forks
13
Avg merge
16h 2m
Merged PRs (30d)
7

Description

### 👓 What did you see?

There is a link option available next to features and scenarios which when clicked update the URL to include an anchor.

Image

When opening this link in a new tab or window, the test report does not automatically scroll to the intended spot. Instead, the report stays at the top.

This was originally raised in https://github.com/reqnroll/Reqnroll/issues/1000

### ✅ What did you expect to see?

The report should scroll to the target link automatically. This allows these links to be sent to others as a quick way of navigating them to a particular feature or scenario within a report.

### 📦 Which tool/library version are you using?

I think it's v24.1.2.

This report is coming via Reqnroll 3.3.1, which uses Cucumber.HtmlFormatter 22.2.0.

### 🔬 How could we reproduce it?

1. Generate a report that's more than a page, so a link heading appears in a place that requires scrolling
2. Click on the link/anchor to add a target (i.e, a hash) to the url
3. Copy the url and paste in a new browser tab/window

Observe that the new report does not scroll to the target link.

### 📚 Any additional context?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.