Search code examples
vaadin-testbench

Don't show Vaadin messages during TestBench test run (@PreserveOnRefresh, reload)


How can I get rid of the dismiss messages displayed during a Vaadin TestBench test run in the right lower corner? Clicking by human does not help. Messages will appear on next test run.

image: dismiss messages

  • @PreserveOnRefresh enabled
  • Java live reload unavailable

Vaadin 23


Solution

  • You should run tests in Production Mode by setting vaadin.productionMode to true. This will disable the developer mode widget. If you're using Maven, you might have a separate profile for this purpose, such as

    <profile>
        <!-- Production mode is activated using -Pproduction -->
        <id>production</id>
        <properties>
            <vaadin.productionMode>true</vaadin.productionMode>
        </properties>
        <!-- ... -->
    

    With Gradle, put

    vaadin {
       productionMode = true
    }
    

    in your build.gradle file.