I want to test a Vaadin flow Component with karibu-testing. In this component I'm using UI.getCurrent().access {} to update this component but when running the test the code inside access won't be executed. The same result when I try to use UI.getCurrent().access {} in the test itself... Some ideas?
pom.xml
<dependency>
<groupId>com.github.mvysny.kaributesting</groupId>
<artifactId>karibu-testing-v10</artifactId>
<version>1.1.4</version>
</dependency>
test (Kotlin)
class MyUITest {
@BeforeAll
fun init() {
MockVaadin.setup()
}
@BeforeEach
fun setup() {
UI.getCurrent().removeAll()
}
@Test
fun testSometing() {
UI.getCurrent().access {
print("foo") // this line is not reachable
}
}
}