Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: ignore windowHeight in partialRun tests #4571

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

straker
Copy link
Contributor

@straker straker commented Sep 3, 2024

This should fix the issue with the tests failing onwindowHeight being different between two consecutive runs.

I also added a deep axe-core results compare function that can do two significant things for us when comparing result objects. First it can ignore keys (like timestamp) so we don't have to always set it equal to each other in the tests. Second is that instead of dumping the entire result objects when a value is different this will output they key path and the values that are different which make debugging a lot easier.

Expected result.testEnvironment.windowHeight to equal "948" but got "896"

@straker straker requested a review from a team as a code owner September 3, 2024 15:25
@straker straker merged commit bdd80c2 into develop Sep 3, 2024
21 checks passed
@straker straker deleted the fix-deep-compare-results branch September 3, 2024 16:00
straker added a commit that referenced this pull request Oct 16, 2024
This should fix the issue with the tests failing on`windowHeight` being
different between two consecutive runs.

I also added a deep axe-core results compare function that can do two
significant things for us when comparing result objects. First it can
ignore keys (like `timestamp`) so we don't have to always set it equal
to each other in the tests. Second is that instead of dumping the entire
result objects when a value is different this will output they key path
and the values that are different which make debugging a lot easier.

```
Expected result.testEnvironment.windowHeight to equal "948" but got "896"
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants