allure-framework / allure-framework/allure-js
Playwright: Publish assert steps on the reporter
- Dominant language
- TypeScript
- Stars
- 281
- Forks
- 137
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 13
Description
**Is your feature request related to a problem? Please describe.**
I need that the Allure HTML report doesn't include the playwright code. For this reason, I set up the details to be false.
```
['allure-playwright',
{
detail: false,
suiteTitle: false,
```
On my playwright tests all of my expect includes the description of the assertion.
```
await expect(bingMapsPage.geoName.locator, 'Geo name is equal to: GermanyBavariaMunich (District)').toHaveText('GermanyBavariaMunich (District)');
```
But this assertion description is only added when the detail is equal to true. Please add the assert descriptions with the detail = false. The only way is to add an extra step to all assertions, but it is easier that the description of the expect functions is added automatically.
**Describe the solution you'd like**
Add the expect description to the HTML report when the detail is set to false. This way, I don't need to wrap all expect with a test.step with the same text of the expect function.
**Describe alternatives you've considered**
Manually wrap the expects functions with a test.step
Add the allure code to add the step
Create a generic assert function and on this function add the test.step
**Additional context**
Contributor guide
Research direction
Start at the allure-playwright integration and trace how the detail option controls assertion reporting. Reproduce the shown expect call with detail set to false, then verify that its description appears in the Allure HTML report without requiring a test.step wrapper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100