I’m trying to write web-integration tests on my login screen. The login screen is extended in a base module that I install through gradle in the actual application.
dependencies {
appComponent("com.haulmont.cuba:cuba-global:$cubaVersion")
appComponent('dental.gc.base:gc-base-global:0.1-SNAPSHOT')
}
I also istall it as a test dependency (at least I think I do)
configure([globalModule, coreModule, webModule]) {
apply(plugin: 'java')
apply(plugin: 'maven')
apply(plugin: 'cuba')
dependencies {
testCompile('org.junit.jupiter:junit-jupiter-api:5.5.2')
testCompile('org.junit.jupiter:junit-jupiter-engine:5.5.2')
testCompile('org.junit.vintage:junit-vintage-engine:5.5.2')
testCompile('dental.gc.base:gc-base-global:0.1-SNAPSHOT')
}
...
The application as such works fine, but tests fails when trying to load the AppLoginScreen screen:
Screen 'login' is not defined. Make sure the screen controller is located inside or below the base package specified in <gui:screens> element of web-spring.xml
so I tried in my web-spring.xml to include it as adviced:
<!-- Annotation-based beans -->
<context:component-scan base-package="dental.gc.userlifecyclemgmt"/>
<gui:screens base-packages="dental.gc.base.web"/>
<gui:screens base-packages="dental.gc.userlifecyclemgmt.web"/>
That doesn’t make a difference though.