Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@AireUITest
@Navigate("zephyr/management/modules/list")
@Routes(scanClassPackage = ModuleGrid.class)
class ModuleGridTest {
@ViewTest
void ensureStoppingAModuleThroughTheStopButtonStopsTheModule(
@Select("vaadin-vertical-layout > aire-drawer")
Drawer drawer, @Context TestContext context, @Autowired Zephyr zephyr) {
val $ = context.downTo(drawer);
val button = $.selectFirst("vaadin-button:nth-of-type(2)", Button.class)
.get(); // throws exception if it's not there
assertTrue(zephyr.getPlugins().stream()
.allMatch(plugin -> plugin.getLifecycle().getState() == State.Active));
button.click();
assertEquals(1, zephyr.getPlugins(State.Resolved).size());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment