gemini-testing / gemini-testing/html-reporter

Change image state name for full page screenshot

Open
#698 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
57
Forks
69
Avg merge
6d 22h
Merged PRs (30d)
9

Description

### Description

Right now, full-page screenshots are saved in the `images` database column, the same way user `assertView` calls are. This full-page screenshot gets a `stateName` calculated as `error_${N}`, where N is the number of user `assertView` commands.

This creates a conflict: if a user calls an `assertView` with `stateName: 'error_1'`, their screenshot will be missing from the report, overwritten by the automatic full-page screenshot.

This should be fixed. The easiest solution is to change the state's name to something unique that a user would never choose, for example, `__testplane_full_page__`.

### Verify latest release

- [x] I verified that the issue exists in the latest html-reporter release

### Html-reporter version

10.19.0

### Last html-reporter version that worked

_No response_

### Link to the code that reproduces this issue or a replay of the bug

_No response_

### Reproduction steps

```typescript
it('some test, async ({browser}) => {
await browser.url('...') // any url
await browser.assertView('error_1', 'body');
throw new Error('any-error');
});
```

### Actual Behavior

AssertView state screenshot is not shown:

Image

### Expected Behavior

AssertView state screenshot is shown (like it does with other state names):

Image

### Which Node.js version are you using?

20.18.1

_Internal issue: https://nda.ya.ru/t/dpHfw1XF7JEZzk_

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.