Skip to content

Commit

Permalink
Fix case of text comparison in Cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
sbreker committed Oct 29, 2024
1 parent bb94fa9 commit f14bbca
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cypress/e2e/oidc/login.cy.js
Original file line number Diff line number Diff line change
@@ -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')
})
Expand Down

0 comments on commit f14bbca

Please sign in to comment.