From f14bbca6cbae13732d8091e9e3ce6f2aad61f86b Mon Sep 17 00:00:00 2001 From: Steve Breker Date: Thu, 24 Oct 2024 16:52:07 -0700 Subject: [PATCH] Fix case of text comparison in Cypress test --- cypress/e2e/oidc/login.cy.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/oidc/login.cy.js b/cypress/e2e/oidc/login.cy.js index dfb9460e5b..49faed6a41 100644 --- a/cypress/e2e/oidc/login.cy.js +++ b/cypress/e2e/oidc/login.cy.js @@ -1,17 +1,29 @@ describe('SSO Login with Keycloak', () => { it('Should redirect to Keycloak and log in successfully with SSO', () => { cy.visit('/') + cy.url().then((currentUrl) => { + console.log('Currently viewing URL:', currentUrl); + }); cy.contains('Log in').should('be.visible').click() cy.contains('Log in with SSO').should('be.visible').click() //cy.url({ timeout: 1000 }).should('include', 'oidc/login'); //cy.url({ timeout: 1000 }).should('include', 'realms/demo/protocol/openid-connect/auth') + cy.url().then((currentUrl) => { + console.log('Currently viewing URL:', currentUrl); + }); cy.get('#username').type(Cypress.env('adminEmail')) cy.get('#password').type(Cypress.env('adminPassword')) cy.get('#kc-login').click(); + cy.url().then((currentUrl) => { + console.log('Currently viewing URL:', currentUrl); + }); // cy.url().should('not.include', 'auth'); // cy.url().should('include', '/dashboard'); - cy.contains('Demo').should('be.visible').click() + cy.document().then((doc) => { + console.log(doc.documentElement.outerHTML); + }); + cy.contains('demo').should('be.visible').click() cy.contains('Log out').should('be.visible').click() cy.contains('Log in') })