fix(core, awesome): remove duplicated step details#242
Merged
Conversation
todti
approved these changes
Jul 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR removed a step's details from all parent steps. That only applies to details with identical messages. If the messages differ, all the details are retained.
The implementation is based on the
hasSimilarErrorInSubStepsflag introduced in #149, but it makes the flag recursive, which fixes #201.E2E page objects refactoring
The idea behind the refactoring is to allow defining fixtures to check parts of pages, specifically, the steps of a test on the test result page. Here is the list of changes:
Split
screenshotintoscreenshotandattachScreenshot. The former can be overridden to attach screenshots of specific elements.Make
TreePageandTestResultPagederive fromCommonPageinstead ofPageObject.Implement
StepResultFixtureto check steps. Currently, it only contains locators and methods to check status details. Other locators and methods can be added to verify parameters, attachments, etc. UseTestResult.getStepByNameorStepResultFixture.getSubstepByNameto create a fixture for a step.Use
StepResultFixture.attachScreenshotto attach a screenshot of the step to Allure (the step must be visible in the report).Implement a custom
toHaveDetailsPlaywright matcher. Example:If an expected value is provided for the step's trace, make sure the step's details are expanded.
We may add other matches in the future. If the module becomes too large, we may split it into separate modules and combine them into a single extension point as described here.
Other changes
@allurereport/e2e.environments.test.tsFixes #201