Skip to content

test: remove real Vaadin components from vaadin-spring-tests#24958

Open
Artur- wants to merge 1 commit into
mainfrom
no-components
Open

test: remove real Vaadin components from vaadin-spring-tests#24958
Artur- wants to merge 1 commit into
mainfrom
no-components

Conversation

@Artur-

@Artur- Artur- commented Jul 8, 2026

Copy link
Copy Markdown
Member

The spring test modules pulled real Vaadin platform web components transitively, which dragged the whole @vaadin/* component npm closure into every frontend build. That made the it-tests job fail intermittently under the pnpm minimum-release-age guard whenever those components were freshly published, and it kept the tests dependent on components that Flow itself no longer uses.

Replace the component usages with faux, Flow-owned equivalents that pull no component npm packages:

  • Swap the real vaadin-lumo-theme for flow-test-lumo (the stub Lumo class that satisfies Flow's @theme(name) classpath check) plus test-lumo-theme (the fake-lumo.css public resource). The real dependency also leaked in transitively through vaadin-test-spring-helpers, so the swap lives in the shared parent pom and covers every module at once.
  • Replace the vaadin Upload component in the four security-flow modules with a native Input(file) + UploadHandler that posts a raw XHR body with an X-Filename header (the servlets are not @MultipartConfig), matching the existing test-spring-common UploadView.
  • Drop the @vaadin/vaadin-themable-mixin import from the reload-time benchmark.js, building the global stylesheet from a plain string instead.
  • Remove the benchmark-directory-addons profile that pulled vaadin-core and third-party add-ons, and the now-unused component.version property.

Unify the upload code the security apps duplicated: the loan-application upload UI moves to a shared LoanApplicationUpload helper in test-spring-helpers, and the browser file-transfer logic (setLocalFileDetector) becomes a uploadFileToNativeInput method on the shared AbstractSpringTest base, also reused by the existing test-spring-common UploadIT.

The spring test modules pulled real Vaadin platform web components
transitively, which dragged the whole @vaadin/* component npm closure into
every frontend build. That made the it-tests job fail intermittently under
the pnpm minimum-release-age guard whenever those components were freshly
published, and it kept the tests dependent on components that Flow itself no
longer uses.

Replace the component usages with faux, Flow-owned equivalents that pull no
component npm packages:

- Swap the real vaadin-lumo-theme for flow-test-lumo (the stub Lumo class
  that satisfies Flow's @theme(name) classpath check) plus test-lumo-theme
  (the fake-lumo.css public resource). The real dependency also leaked in
  transitively through vaadin-test-spring-helpers, so the swap lives in the
  shared parent pom and covers every module at once.
- Replace the vaadin Upload component in the four security-flow modules with
  a native Input(file) + UploadHandler that posts a raw XHR body with an
  X-Filename header (the servlets are not @MultipartConfig), matching the
  existing test-spring-common UploadView.
- Drop the @vaadin/vaadin-themable-mixin import from the reload-time
  benchmark.js, building the global stylesheet from a plain string instead.
- Remove the benchmark-directory-addons profile that pulled vaadin-core and
  third-party add-ons, and the now-unused component.version property.

Unify the upload code the security apps duplicated: the loan-application
upload UI moves to a shared LoanApplicationUpload helper in
test-spring-helpers, and the browser file-transfer logic (setLocalFileDetector)
becomes a uploadFileToNativeInput method on the shared AbstractSpringTest base,
also reused by the existing test-spring-common UploadIT.
@github-actions github-actions Bot added the +0.0.1 label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 456 files  ±0   1 456 suites  ±0   1h 43m 13s ⏱️ +40s
10 306 tests ±0  10 238 ✅ ±0  68 💤 ±0  0 ❌ ±0 
10 778 runs  ±0  10 709 ✅ ±0  69 💤 ±0  0 ❌ ±0 

Results for commit d024dbe. ± Comparison against base commit 5d0b10e.

♻️ This comment has been updated with latest results.

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

</plugins>
</build>

<profiles>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the dependencies were added to increase the startup class scanning effort. Removing all of them might somehow make the benchmark tests less effective.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but the benchmark would need to be outside the flow project if it tests the full platform

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Actually, it already runs only as a nightly CI build, not during PR validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants