Search in sources :

Example 1 with Routes

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

the class TopLevelVaadinTestCaseTest method ensureTestMethodWithViewTestGeneratesFrameEntryWithMethod.

@ViewTest
@Navigate("test")
@Routes(scanPackage = "com.aire.ux.test.vaadin.scenarios.classroutes")
void ensureTestMethodWithViewTestGeneratesFrameEntryWithMethod() {
    val method = Frames.resolveCurrentFrame().getContext().getTestMethod();
    assertTrue(method.isPresent());
}
Also used : lombok.val(lombok.val) ViewTest(com.aire.ux.test.ViewTest) Navigate(com.aire.ux.test.Navigate) Routes(com.aire.ux.test.Routes)

Example 2 with Routes

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

the class NavigationTest method ensureRouteIsAvailable.

@Order(2)
@ViewTest
@Navigate("main")
@Routes(scanClassPackage = MainLayout.class)
void ensureRouteIsAvailable(@Context TestContext context) {
    val layout = context.selectFirst(MainLayout.class);
    assertTrue(layout.isPresent());
}
Also used : lombok.val(lombok.val) Order(org.junit.jupiter.api.Order) ViewTest(com.aire.ux.test.ViewTest) Navigate(com.aire.ux.test.Navigate) Routes(com.aire.ux.test.Routes)

Example 3 with Routes

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

the class TopLevelVaadinTestCaseTest method ensureTestMethodGeneratesFrameWithCurrentMethod.

@ViewTest
@Navigate("test")
@Routes(scanPackage = "com.aire.ux.test.vaadin.scenarios.classroutes")
void ensureTestMethodGeneratesFrameWithCurrentMethod() throws NoSuchMethodException {
    val method = Frames.resolveCurrentFrame().getContext().getTestMethod();
    assertTrue(method.isPresent());
    val m = method.get();
    assertEquals(m, TopLevelVaadinTestCaseTest.class.getDeclaredMethod("ensureTestMethodGeneratesFrameWithCurrentMethod"));
}
Also used : lombok.val(lombok.val) ViewTest(com.aire.ux.test.ViewTest) Navigate(com.aire.ux.test.Navigate) Routes(com.aire.ux.test.Routes)

Example 4 with Routes

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

the class TopLevelVaadinTestCaseTest method ensureTestMethodGeneratesFrameWithCurrentMethod2.

@ViewTest
@Navigate("test")
@Routes(scanPackage = "com.aire.ux.test.vaadin.scenarios.classroutes")
void ensureTestMethodGeneratesFrameWithCurrentMethod2(@Select ClassScenarioRouteLayout layout) throws NoSuchMethodException {
    val method = Frames.resolveCurrentFrame().getContext().getTestMethod();
    assertTrue(method.isPresent());
    val m = method.get();
    assertEquals(m, TopLevelVaadinTestCaseTest.class.getDeclaredMethod("ensureTestMethodGeneratesFrameWithCurrentMethod2", ClassScenarioRouteLayout.class));
}
Also used : lombok.val(lombok.val) ClassScenarioRouteLayout(com.aire.ux.test.vaadin.scenarios.classroutes.ClassScenarioRouteLayout) ViewTest(com.aire.ux.test.ViewTest) Navigate(com.aire.ux.test.Navigate) Routes(com.aire.ux.test.Routes)

Aggregations

Navigate (com.aire.ux.test.Navigate)4 Routes (com.aire.ux.test.Routes)4 ViewTest (com.aire.ux.test.ViewTest)4 lombok.val (lombok.val)4 ClassScenarioRouteLayout (com.aire.ux.test.vaadin.scenarios.classroutes.ClassScenarioRouteLayout)1 Order (org.junit.jupiter.api.Order)1