From c3586b00e068b82c8f23103e9ac9f2d20dddf024 Mon Sep 17 00:00:00 2001
From: Arie Peterson <arie@greenhost.nl>
Date: Wed, 3 May 2023 15:20:56 +0200
Subject: [PATCH] Log in to dashboard in test

---
 tests/cypress/e2e/test-dashboard.cy.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/cypress/e2e/test-dashboard.cy.js b/tests/cypress/e2e/test-dashboard.cy.js
index 897bffca..504e96fb 100644
--- a/tests/cypress/e2e/test-dashboard.cy.js
+++ b/tests/cypress/e2e/test-dashboard.cy.js
@@ -10,5 +10,15 @@ describe('Test dashboard', () => {
   it('passes', () => {
 
     cy.visit('/')
+
+    // Log in using credentials from env vars.
+    cy.get('#identifier.form-control')
+      .type(Cypress.env('SSO_USER'))
+    cy.get('#password.form-control')
+      .type(Cypress.env('SSO_PASSWORD'))
+    cy.contains('Log in').click()
+
+    // Check that the support link is visible.
+    cy.contains('Access documentation website')
   })
 })
-- 
GitLab