Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Dec 18, 2024
1 parent 110a158 commit b850597
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
8 changes: 4 additions & 4 deletions karibu-testing-v10-spring/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Karibu-Testing doesn't officially support Spring. However, there are couple of very
simple example projects that might help you get started.
# Karibu-Testing Spring Integration

Please see [t-shirt shop example](https://github.com/mvysny/t-shirt-shop-example) on
Karibu-Testing offers basic support for Spring. Please see [t-shirt shop example](https://github.com/mvysny/t-shirt-shop-example) for
an example on how to use Karibu-Testing with a Spring app.

Please see [vaadin-spring-karibu-testing](https://github.com/mvysny/vaadin-spring-karibu-testing)
Expand Down Expand Up @@ -38,7 +37,8 @@ and `MultiselectComboBox`.
Spring Security is not supported out-of-the-box: Spring Security usually uses Servlet Filter
which requires Servlet Container to be up and running, yet Karibu-Testing doesn't
start any Servlet Container. See [Issue #47](https://github.com/mvysny/karibu-testing/issues/47)
for more details.
for more details. One of the workarounds is to [Manually Authenticate User with Spring Security](https://www.baeldung.com/manually-set-user-authentication-spring-security),
before navigating to a view.

There are ways to enable Spring Security in Karibu's faked environment though, please
take a look at [issue #94](https://github.com/mvysny/karibu-testing/issues/94) and
Expand Down
34 changes: 1 addition & 33 deletions karibu-testing-v10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1620,39 +1620,7 @@ simply set `Routes.skipPwaInit` to `false`.
## Using Karibu-Testing with Spring
Karibu-Testing offers basic support for Spring.
Please see [t-shirt shop example](https://github.com/mvysny/t-shirt-shop-example) for
an example on how to use Karibu-Testing with a Spring app.
Note that Spring Security is not supported: Spring Security uses Servlet Filter
which requires Servlet Container to be up and running, yet Karibu-Testing doesn't
start any Servlet Container. See [Issue #47](https://github.com/mvysny/karibu-testing/issues/47)
for more details. The workaround is to [Manually Authenticate User with Spring Security](https://www.baeldung.com/manually-set-user-authentication-spring-security),
before navigating to a view.
To add Karibu-Testing spring integration pack into your app, add the following dependencies to your project's `pom.xml`:
```xml
<dependencies>
<dependency>
<groupId>com.github.mvysny.kaributesting</groupId>
<artifactId>karibu-testing-v10-spring</artifactId>
<version>1.3.23</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mvysny.kaributesting</groupId>
<artifactId>karibu-testing-v23</artifactId>
<version>1.3.23</version>
<scope>test</scope>
</dependency>
</dependencies>
```

The first dependency will add the Karibu-Testing core jar (`karibu-testing-v10`) and a Spring integration
jar on top of that (`karibu-testing-v10-spring`); the second dependency
will add additional support for testing Vaadin 23 components such as `VirtualList`
and `MultiselectComboBox`.
See [karibu-testing-v10-spring](../karibu-testing-v10-spring) for more details.
## Plugging into the testing lifecycle
Expand Down

0 comments on commit b850597

Please sign in to comment.