Skip to content

Instantly share code, notes, and snippets.

@josiahhaswell
Created February 3, 2022 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josiahhaswell/43bd531ea50c34a042d328590655ef71 to your computer and use it in GitHub Desktop.
Save josiahhaswell/43bd531ea50c34a042d328590655ef71 to your computer and use it in GitHub Desktop.
@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