There might be situations where different tests need different configurations.
One example is testing a view with a component behind a feature flag.
Another example could be enabling UI serialization (devmode.sessionSerialization.enabled=true) only for certain tests.
Currently, the only way to test this is to set system properties in before hook and reset it in after hook.
It would be nice if we could provide a way to apply similar configurations per single test / test class (after implementing #22).
One option could be to add a @BrowserlessTestConfig(featureFlags={}, applicationProperties={}) annotation;
for properties we can propagate them to the mock servlet MockVaadin.setup(...) (as we do enforce browserless mode).
FeatureFlags can be a bit more tricky, but I guess we can "inject" a custom instance into Lookup, in the same MockVaadin.setup(...) method.
There might be situations where different tests need different configurations.
One example is testing a view with a component behind a feature flag.
Another example could be enabling UI serialization (
devmode.sessionSerialization.enabled=true) only for certain tests.Currently, the only way to test this is to set system properties in before hook and reset it in after hook.
It would be nice if we could provide a way to apply similar configurations per single test / test class (after implementing #22).
One option could be to add a
@BrowserlessTestConfig(featureFlags={}, applicationProperties={})annotation;for properties we can propagate them to the mock servlet
MockVaadin.setup(...)(as we do enforcebrowserlessmode).FeatureFlagscan be a bit more tricky, but I guess we can "inject" a custom instance intoLookup, in the sameMockVaadin.setup(...)method.