Comments (6)
I tested and noticed there was for some reason one "M" instead of "m". Fixed that in 5f85b8d
But I'm not 100% sure if that was your issue, because there seems to be some weird package.json errors in your log. Let us know if the issue continues if you fix the selector or is this somethign else?
from docs.
Thanks for looking into that! With the update I now run into a Spring configuration issue.
I am using a simple SpringBoot starter from start.vaadin.com with a "Hello World" view. I attached it for convenience.
playwright.zip
10:40:37.167 [ForkJoinPool-1-worker-1] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.example.TrivialPlaywrightTest]: TrivialPlaywrightTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.552 s <<< FAILURE! -- in com.example.TrivialPlaywrightTest
[ERROR] com.example.TrivialPlaywrightTest -- Time elapsed: 0.552 s <<< ERROR!
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
[...]
from docs.
Did you try what the error message suggested? That would probably be adding "classes=Application.class" (and related import) to the SpringBootTest annotation. Alternatively move the test to the same package where you have the Application class (but still in src/test/java source directory).
from docs.
I actually did that previously, yet the test still crashed and burned. Moving the test class to src\test\java\com\example\application\views\helloworld\TrivialPlaywrightTest.java and adding the view class to the test gives:
[ERROR] Errors:
[ERROR] TrivialPlaywrightTest.testClicking ยป IllegalState Failed to load ApplicationContext for [WebMergedContextConfiguration@485f70bd testClass = com.example.application.views.helloworld.TrivialPlaywrightTest, locations = [], classes = [com.example.application.views.helloworld.HelloWorldView], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true", "server.port=0"], contextCustomizers = [org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@297bc4d8, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@3300e7d8, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@372be360, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@49c3453b, org.springframework.boot.test.context.SpringBootTestAnnotation@48004231], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null]
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
The underlying issue seems to be:
Caused by: org.springframework.context.ApplicationContextException: Unable to start web server
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1454)
at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152)
... 21 more
Caused by: org.springframework.boot.web.context.MissingWebServerFactoryBeanException: No qualifying bean of type 'org.springframework.boot.web.servlet.server.ServletWebServerFactory' available: Unable to start AnnotationConfigServletWebServerApplicationContext due to missing ServletWebServerFactory bean
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:216)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:186)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)
... 35 more
The commonly suggest solution to add @SpringBootApplication
to the Application.java does not apply as the annotation is already there (and the application works just fine with mvn spring-boot:run
). What am I missing?
from docs.
I tested with your attached project and all fine there with both solutions I suggested ๐คทโโ๏ธ If you have our support package, try to get somebody from there to help, althought this is purely Spring Boot configuation issue, rather than anything related to Vaadin-Playwright setup.
from docs.
Thanks for testing. Let's see if I can find a solution.
from docs.
Related Issues (20)
- Add docs for SideNav link target support
- Add docs for SideNav query params support
- Add docs for readonly Checkbox
- Add docs for Checkbox required state and helper feature
- Mention the breaking changes in lit in the upgrade guide
- Document AtMenu annotation in Flow
- Add docs for SideNav client-side router integration
- Hilla FAQ - SSR HOT 4
- Refactor Upload docs
- Add Charts-subpage for React
- Refactor DatePicker Formats section
- docs: hilla - suggest to install IDE plugins
- Automatic main menu documentation HOT 1
- Documentation to help Java developers think in React
- Document how to wrap a field React component into Flow component
- Router query parameters page missing in latest HOT 1
- Mention the drag selection in Grid documentation
- Grid PartNameGenerator sample has unnecessary classname HOT 3
- Findings on copilot page
- Enhance MSCB docs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.