diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2b7a3ab4da667866f940ddc56809c81f1c428a7..6040268fede61710900962169781f0e1d3ca883b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -113,6 +113,7 @@ e2e-test:
     # - apt install -y snapd
     # - snap install chromium --beta
     # - apt-get update
+    - export JHI_E2E_HEADLESS=true
     - npm run e2e
 # sonar-analyze:
 #   stage: analyze
diff --git a/src/test/javascript/protractor.conf.js b/src/test/javascript/protractor.conf.js
index b34b4e3ee123e506bcc0837dd51fed51e4d63354..85e6d0254f76cf2030fb006a8e58ba032e4dddb1 100644
--- a/src/test/javascript/protractor.conf.js
+++ b/src/test/javascript/protractor.conf.js
@@ -13,7 +13,7 @@ exports.config = {
     chromeOptions: {
       args: process.env.JHI_E2E_HEADLESS
         ? ['--headless', '--disable-gpu', '--window-size=1920,1080', '--start-maximized', '--no-sandbox']
-        : ['--disable-gpu', '--window-size=800,600'],
+        : ['--headless', '--disable-gpu', '--window-size=800,600'],
     },
   },