Search in sources :

Example 21 with ViewTest

use of com.aire.ux.test.ViewTest in project aire-components by aire-ux.

the class ApplicationLayoutTest method ensureSelectionWorksWithNoAuxClass.

@ViewTest
void ensureSelectionWorksWithNoAuxClass(@Autowired UserInterface ui) {
    val result = ui.selectFirst(Selection.path(":main:navigation"));
    assertTrue(result.isPresent());
}
Also used : lombok.val(lombok.val) ViewTest(com.aire.ux.test.ViewTest)

Example 22 with ViewTest

use of com.aire.ux.test.ViewTest in project aire-components by aire-ux.

the class ClientMethodsTest method ensureClientMethodIsInvokable.

@ViewTest
void ensureClientMethodIsInvokable() {
    val result = ClientMethods.withUiSupplier(UI::getCurrent).construct(AddVertexTemplateAction.class, new VertexTemplate());
    assertNotNull(result);
}
Also used : lombok.val(lombok.val) VertexTemplate(io.sunshower.zephyr.ui.canvas.VertexTemplate) ViewTest(com.aire.ux.test.ViewTest)

Example 23 with ViewTest

use of com.aire.ux.test.ViewTest in project aire-components by aire-ux.

the class InMemoryFeatureManagerTest method ensureUiIsInjectable.

@ViewTest
void ensureUiIsInjectable(@Context TestContext $) {
    $.navigate(TestFeatureView.class);
    $.flush();
    val button = $.selectFirst("vaadin-button[text*=test]", Button.class);
    assertTrue(button.isPresent());
}
Also used : lombok.val(lombok.val) ViewTest(com.aire.ux.test.ViewTest)

Aggregations

ViewTest (com.aire.ux.test.ViewTest)23 lombok.val (lombok.val)23 Navigate (com.aire.ux.test.Navigate)8 Routes (com.aire.ux.test.Routes)6 DirtiesContext (org.springframework.test.annotation.DirtiesContext)6 Button (com.vaadin.flow.component.button.Button)5 NavigationBar (io.sunshower.zephyr.ui.navigation.NavigationBar)3 DefaultComponentExtension (com.aire.ux.DefaultComponentExtension)2 Context (com.aire.ux.test.Context)2 Select (com.aire.ux.test.Select)2 TestContext (com.aire.ux.test.TestContext)2 Grid (com.vaadin.flow.component.grid.Grid)2 MainView (io.sunshower.zephyr.MainView)2 MainNavigationComponent (io.sunshower.zephyr.ui.layout.scenario1.MainNavigationComponent)2 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)2 Assertions.assertNotNull (org.junit.jupiter.api.Assertions.assertNotNull)2 Autowired (org.springframework.beans.factory.annotation.Autowired)2 FeatureDescriptor (com.aire.features.FeatureDescriptor)1 Extensions (com.aire.ux.Extensions)1 RouteDefinition (com.aire.ux.RouteDefinition)1