gs-crud-with-vaadin icon indicating copy to clipboard operation
gs-crud-with-vaadin copied to clipboard

chore: change to WebEnvironment.MOCK in tests.

Open manolo opened this issue 9 months ago • 1 comments

It fixes migration to next vaadin version 24.4.x See: https://github.com/vaadin/hilla/issues/2169

manolo avatar May 02 '24 14:05 manolo

Hi @manolo! Is the webEnvironment parameter is required at all? Removing the parameter completely has no impact on the tests. Looking at MainViewTests, I can't see the need for a server to start.

The tests in MainViewTests (and also CrudWithVaadinApplicationTests) look like unit tests similar to these tests as referenced in this guide. These tests look different than the end to end tests defined in this class and this section of the guide that do require a server to start. I can't see any end to end tests in this repo.

If this issue shows up in 24.4, perhaps we can address this PR with an upcoming version bump of Vaadin. It looks like 24.4 is due out this month. What do you think?

robertmcnees avatar May 07 '24 11:05 robertmcnees

Hi, @robertmcnees here is the PR to upgrade this project to Vaadin 24.4, and it needs this fix to pass. https://github.com/spring-guides/gs-crud-with-vaadin/pull/115

ZheSun88 avatar Jun 12 '24 08:06 ZheSun88

Thanks for the PR @manolo and the context @ZheSun88. I merged this PR so that the tests would pass when upgrading the Vaadin version to 24.4.1.

This repository is now managed by dependabot so if a scenario like this arises again we should be able to push additional commits to the dependabot PR when the CI build fails. Hopefully that makes our workflow easier to sustain going forward.

Thanks for your contribution!

robertmcnees avatar Jun 12 '24 12:06 robertmcnees