You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hadn't done this tests as a part of the fix for the ticket because we don't have any tests for built-in themes at all.
I've made IT tests for Lumo and Material themes.
I suggest to make a bundle from lumo tests in the same way as it has been done with test-root-context.
It doesn't matter how it will be done in the end but I'm pretty sure that this way requires less efforts:
make a new bundle from lumo views (existing Lumo test module). As mentioned: exactly in the same way as for test-root-context.
deploy this bundle to felix in the existing OSGi IT tests.
run IT (existing) test for Lumo .
There is one issue which you should be aware of: we assume that our test-root-context are executed without any theme (even if the don't have NoTheme annotation).
Deployed lumo theme bundle will activate Lumo theme by default.
This may be unexpected and may be need to be prevented.
I suggest to use a custom UI class with overridden getThemeFor.
This method should not return Lumo if there is no explicitly defined theme.
It should return theme if there is explicitly defined theme.
And there should be some marker for classes which wants to have implicit Lumo theme ( some kind of opposite for NoTheme annotation).
We need to test:
class (only one single dedicated class) which has no explicit Lumo annotation but gets the Lumo theme by default (can be done via checking some custom annotation added to the class).
class which has explicit Lumo annotation.
All other classes (most likely) should not be themed using Lumo (even though it's in the classpath and automatic theme discovering works). As I said this can be done via overriding getThemeFor.
In case of any questions about the implementation suggestion ask me.
The text was updated successfully, but these errors were encountered:
We need a test for vaadin/flow#4847.
I hadn't done this tests as a part of the fix for the ticket because we don't have any tests for built-in themes at all.
I've made IT tests for
Lumo
andMaterial
themes.I suggest to make a bundle from lumo tests in the same way as it has been done with
test-root-context
.It doesn't matter how it will be done in the end but I'm pretty sure that this way requires less efforts:
test-root-context
.There is one issue which you should be aware of: we assume that our
test-root-context
are executed without any theme (even if the don't haveNoTheme
annotation).Deployed lumo theme bundle will activate
Lumo
theme by default.This may be unexpected and may be need to be prevented.
I suggest to use a custom
UI
class with overriddengetThemeFor
.This method should not return
Lumo
if there is no explicitly defined theme.It should return theme if there is explicitly defined theme.
And there should be some marker for classes which wants to have implicit
Lumo
theme ( some kind of opposite forNoTheme
annotation).We need to test:
Lumo
annotation but gets the Lumo theme by default (can be done via checking some custom annotation added to the class).Lumo
annotation.All other classes (most likely) should not be themed using
Lumo
(even though it's in the classpath and automatic theme discovering works). As I said this can be done via overridinggetThemeFor
.In case of any questions about the implementation suggestion ask me.
The text was updated successfully, but these errors were encountered: