Is there any example of writing UI tests with comp...
# compose-desktop
s
Is there any example of writing UI tests with compose desktop?
j
cc @Filip Pavlis @Jelle Fresen [G]
s
@Igor Demin Thanks for the link. So there is no sample, but in the mean time does
Copy code
testImplementation(compose("org.jetbrains.compose.ui:ui-test-junit4"))
work?
i
Yes, it works.
c
Not to hijack, but do people write unit tests for UI? Or would you write "screenshot" tests?
i
unit tests for UI
It depends on what is needed to be tested. If it is some custom component then UI testing would be very useful, because we test component as a whole (input events -> LayoutNode tree) If it is just usual screen with standard components, then probably the easier/right option would be to test only ViewState/ViewModel.
👍 1