From bb0f237f25bee5bbc03284eb5f68d7487fc386aa Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Mon, 18 Oct 2021 17:05:20 +0200
Subject: [PATCH] Test dashboard login page

Fixes: #969
---
 .gitlab-ci.yml     |  9 +++++++++
 test/taiko/apps.js | 11 +++++++++++
 2 files changed, 20 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7f6d42d37..db86fa053 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -628,6 +628,15 @@ kube-prometheus-stack-alerts:
     when: on_failure
   interruptible: true
 
+dashboard-taiko:
+  variables:
+    RESOURCE: "dashboard"
+  needs:
+    - job: testinfra
+  extends:
+    - .taiko
+    - .general_rules
+
 grafana-taiko:
   variables:
     RESOURCE: "grafana"
diff --git a/test/taiko/apps.js b/test/taiko/apps.js
index 30efaaa23..2ea9d8e8a 100644
--- a/test/taiko/apps.js
+++ b/test/taiko/apps.js
@@ -176,6 +176,17 @@ const assert = require('assert');
       await click("Sign In with Oidc")
     }
 
+    // Dashboard
+    if (taikoTests.includes('dashboard') || taikoTests === 'all') {
+      const dashboardUrl = 'https://admin.' + domain
+
+      console.log('• Dashboard')
+      await goto(dashboardUrl)
+      await click("Login")
+      await click('Login with OAS')
+      await assert.ok(await text('Log in to user-panel').exists());
+    }
+
   } catch (error) {
     await screenshot()
     console.error(error)
-- 
GitLab