Fixed test build failures caused by ChromeHeadless height and a test dependent on window height #10532
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.
Description
This PR is to fix the issue of failures happening during build with
npm test
.After some attempts I noticed that the failing test was not failing using ``test:watch
but as well as I resized the window to a smaller height (
523px` was the limit in the test), it started failing with the same error.So I supposed that some changes on `ChromeHeadless` may set the window to a smaller value, so the test fails.
I tried to execute the test with smaller height values on
scroll-container
in the given test and I noticed that the size needed to make it fail by resizing the window height decreased.So I tried the same approach with tests with ChromeHeadless, where I can not resize the window, by adjustind the height of
scroll-container
.I found the limit of scroll container to 430px in scroll-container to make it fail. 429 is successful on ChromeHeadless.
So I decided to put the pixel at a very small value (for security), that make anyway the tests work, and it looks to work also with ChromeHeadless.
Hope this fixes also the failures on the backend. This fix may need to be backported
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
No issue at the moment. @tdipisa should we create one.
What is the new behavior?
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information