diff --git a/README.md b/README.md
index 297b85f..7d553a6 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,17 @@ To run the integration tests, execute the following command:
mvn -Pit verify
```
+To debug the UI with a visible browser, disable headless mode using either the
+`headless` property or the `debug-ui` profile:
+
+```bash
+# system property
+mvn -Dit.test=ContextMenuViewIT -Dheadless=false verify
+
+# convenient profile
+mvn -Pdebug-ui -Dit.test=ContextMenuViewIT verify
+```
+
## How to use it
Add the addon as a test dependency.
diff --git a/pom.xml b/pom.xml
index b7cc780..dc5d7c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,10 +147,16 @@
org.apache.maven.plugins
maven-surefire-plugin
3.2.5
+
+
+ ${headless}
+
+
org.apache.maven.plugins
maven-failsafe-plugin
+ 3.5.4
@@ -165,6 +171,9 @@
false
true
+
+ ${headless}
+
@@ -190,6 +199,12 @@
+
+ debug-ui
+
+ false
+
+
release
@@ -251,4 +266,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/bundles/dev.bundle b/src/main/bundles/dev.bundle
index d470b51..512c22f 100644
Binary files a/src/main/bundles/dev.bundle and b/src/main/bundles/dev.bundle differ
diff --git a/src/main/java/org/vaadin/addons/dramafinder/AbstractBasePlaywrightIT.java b/src/main/java/org/vaadin/addons/dramafinder/AbstractBasePlaywrightIT.java
index 21dcbc2..f44fbb6 100644
--- a/src/main/java/org/vaadin/addons/dramafinder/AbstractBasePlaywrightIT.java
+++ b/src/main/java/org/vaadin/addons/dramafinder/AbstractBasePlaywrightIT.java
@@ -105,6 +105,13 @@ protected void select(Locator locator, String val) {
}
protected static boolean isHeadless() {
- return true;
+ String propertyValue = System.getProperty("headless");
+ if (propertyValue == null || propertyValue.isBlank()) {
+ propertyValue = System.getenv("HEADLESS");
+ }
+ if (propertyValue == null || propertyValue.isBlank()) {
+ return true;
+ }
+ return Boolean.parseBoolean(propertyValue);
}
-}
\ No newline at end of file
+}