Skip to content

A simple Vaadin app with a view to submit t-shirt orders and another to list entries

License

Notifications You must be signed in to change notification settings

mvysny/t-shirt-shop-example

 
 

Repository files navigation

Karibu Testing example with Vaadin and Spring Boot

This project demonstrates the possibility to test your Vaadin Spring apps with Karibu Testing.

The example contains a view that submits T-shirt orders. The UI is similar to what you might have seen in Vaadin expo booth.

T-shirt Shop

In addition this version submits the orders to a JPA backend, validates the data automatically based on JSR-303 annotations in the domain object and also contains a view to list current submissions.

Requires JDK 11+.

Clone and run the app

You can use it as a basis for your Vaadin experiments. To play around with the example, check it out using git or download the zip. Import it to your favorite IDE and execute the Application class or start the app from command line using:

git clone https://github.com/mvysny/t-shirt-shop-example
cd t-shirt-shop-example
mvn spring-boot:run

The application opens to http://localhost:8080

To run the tests, simply run

mvn clean test

The test will boot up the app and configure Karibu-Testing Spring integration properly, so that mocked Vaadin works with Spring properly. See the ApplicationTest.java class for more details.

Where to go from here?

Visit Karibu-Testing for full documentation on Vaadin Unit testing.

There is a tutorial about Creating CRUD UI with Vaadin at https://spring.io/guides/gs/crud-with-vaadin/ and for more complete Vaadin examples, visit http://vaadin.com/start

About

A simple Vaadin app with a view to submit t-shirt orders and another to list entries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 92.5%
  • HTML 4.1%
  • TypeScript 2.2%
  • CSS 1.2%