Hello! I’m getting started with Vaadin Flow. I use TDD and usually work from the outside in. In a typical Spring MVC app I would start by writing a simple MVC test just to make sure that the endpoint is wired up correctly, like this:
@WebMvcTest(HomeController.class)
@Tag("mvc")
class HomeMvcTest {
@Autowired
MockMvc mockMvc;
@Test
public void getRequestToIndex() throws Exception {
mockMvc.perform(get("/"))
.andExpect(status().is2xxSuccessful());
}
Based on Vaadin documentation, it seems like the closest thing is UIUnitTest. Is that correct? Something like this:
Sadly, I can’t actually try it because this testing framework is a paid feature?
Is there another recommended way to test endpoints. I feel like I’m at the very beginning of the journey here, so it seems a little premature to sign up for the Pro license. I was hoping to kick the tires a bit more to make sure I’m making the right choice.
Side question: How do you submit a website bug report? Some the text here in the forum in dark mode is not readable.
Thanks Simon! Karibu Seems like a lot of setup for my goal of simply verifying that an endpoint is accessible, but I’ll probably want to look at something like that once authorization and authentication come into play.