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

Make @ViewPackages inheritable #1736

Open
mvysny opened this issue Feb 5, 2024 · 0 comments
Open

Make @ViewPackages inheritable #1736

mvysny opened this issue Feb 5, 2024 · 0 comments

Comments

@mvysny
Copy link
Member

mvysny commented Feb 5, 2024

BaseUIUnitTest.scanPackages() only considers ViewPackages on the test class itself, and not on any of the superclasses. That prevents me to create a single abstract inheritable test class that configures the entire test environment, and forces me to repeat the @ViewPackages annotation on all test classes.

An example of a reusable inheritable test class:

/**
 * Fully bootstraps the app, then runs UI unit tests on top of the app.
 */
@SpringBootTest
@ActiveProfiles("test")
@ContextConfiguration(classes = IntegrationTestConfiguration.class)
@EnableConfigurationProperties
@Tag("integrationTest")
@ViewPackages(packages = {"at.salzburgag.myflexbox.customerapp"})
@ExtendWith(TreeOnFailureExtension.class)
public abstract class FastUIIntegrationTest extends SpringUIUnitTest {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants