use of com.aire.ux.test.Select in project aire-components by aire-ux.
the class ExploratorySpringTest method ensureInteractingWithElementWorks.
@ViewTest
@Navigate("main")
void ensureInteractingWithElementWorks(@Autowired ApplicationContext applicationContext, @Select(".main") Element initialView, @Select(".main > vaadin-button") Button button, @Context TestContext context) {
assertNotNull(applicationContext);
assertEquals(0, initialView.getComponent().map(component -> (MainView) component).orElseThrow().getCount());
button.click();
val view = context.selectFirst(".main", MainView.class).get();
assertEquals(view.getCount(), 1);
}
Aggregations