Skip to content

Commit

Permalink
Move default Cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbreker committed Oct 22, 2024
1 parent ed2db32 commit 9e0004d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ module.exports = defineConfig({
},
retries: {'runMode': 2},
baseUrl: 'http://localhost:63001',
specPattern: 'cypress/e2e/default/**/*.cy.js',
supportFile: 'cypress/support/e2e.js'
},
})
5 changes: 5 additions & 0 deletions cypress.config.oidc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
env: {
adminEmail: '[email protected]',
adminPassword: 'demo',
},
e2e: {
retries: {'runMode': 2},
baseUrl: 'http://localhost:63001',
specPattern: 'cypress/e2e/oidc/**/*.cy.js',
supportFile: 'cypress/support/e2e.js'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 7 additions & 4 deletions cypress/e2e/oidc/login.cy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
describe('SSO Login with Keycloak', () => {
it('Should redirect to Keycloak and log in successfully with SSO', () => {
cy.visit('/')
cy.contains('Log in with SSO').click()
cy.url().should('include', 'realms/demo/protocol/openid-connect/auth');
// cy.get('#username').type('[email protected]');
// cy.get('#password').type('demo');
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.get('#username').type(Cypress.env('adminEmail'))
// cy.get('#password').type(Cypress.env('adminPassword'))

// cy.get('#kc-login').click();
// cy.url().should('not.include', 'auth');
// cy.url().should('include', '/dashboard');
Expand Down

0 comments on commit 9e0004d

Please sign in to comment.