From 02289892027f58305a058c8630fced02d4cfc0a9 Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Sat, 30 Aug 2025 22:18:00 +0530 Subject: [PATCH] fix cypress test --- frontend/cypress/e2e/testLogin.cy.js | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/frontend/cypress/e2e/testLogin.cy.js b/frontend/cypress/e2e/testLogin.cy.js index 0ae419f..ab8bc13 100644 --- a/frontend/cypress/e2e/testLogin.cy.js +++ b/frontend/cypress/e2e/testLogin.cy.js @@ -6,17 +6,27 @@ describe('Login Component', () => { cy.visit('/') // Mock the API response for OIDC providers - cy.intercept('GET', '**/api/v1/oidc/enabled', { + cy.intercept('GET', '**/api/v1/config', { statusCode: 200, body: { - data: [ - { - id: 1, - name: 'Google', - logo_url: 'https://example.com/google-logo.png', - disabled: false - } - ] + data: { + "app.favicon_url": "http://localhost:9000/favicon.ico", + "app.lang": "en", + "app.logo_url": "http://localhost:9000/logo.png", + "app.site_name": "Libredesk", + "sso_providers": [ + { + "client_id": "xx", + "enabled": true, + "id": 1, + "logo": "/images/google-logo.png", + "name": "asdas", + "provider": "Google", + "provider_url": "https://accounts.google.com", + "redirect_uri": "http://localhost:9000/api/v1/oidc/1/finish" + } + ] + } } }).as('getOIDCProviders') })