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

Fixed test build failures caused by ChromeHeadless height and a test dependent on window height #10532

Merged

Conversation

offtherailz
Copy link
Member

@offtherailz offtherailz commented Sep 4, 2024

Description

This PR is to fix the issue of failures happening during build with npm test.

image

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)

  • CI related changes

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)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@offtherailz offtherailz self-assigned this Sep 4, 2024
@offtherailz offtherailz requested a review from tdipisa September 4, 2024 16:12
@offtherailz offtherailz changed the title Fixed test due to chrome headless issue in size Fixed test build failures caused by ChromeHeadless height and a test dependent on window height Sep 4, 2024
@tdipisa tdipisa added this to the 2024.02.00 milestone Sep 5, 2024
@tdipisa tdipisa merged commit 5c52799 into geosolutions-it:master Sep 5, 2024
6 checks passed
@tdipisa
Copy link
Member

tdipisa commented Sep 5, 2024

@offtherailz it seems a backport to 2024.01.xx is necessary: https://github.com/geosolutions-it/MapStore2/actions/runs/10573476730/job/29713019887#step:9:9988

I ran the last build job on that branch and it fails for the same reason.

@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 5, 2024
offtherailz added a commit to offtherailz/MapStore2 that referenced this pull request Sep 5, 2024
…dependent on window height (geosolutions-it#10532)

* Fixed test due to chrome headless issue in size

* Fixed test due to chrome headless issue in size
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 5, 2024
offtherailz added a commit that referenced this pull request Sep 5, 2024
offtherailz added a commit that referenced this pull request Oct 18, 2024
…dependent on window height (#10532)

* Fixed test due to chrome headless issue in size

* Fixed test due to chrome headless issue in size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants