fix cypress test

This commit is contained in:
Abhinav Raut
2025-08-30 22:18:00 +05:30
parent 3f7d151d33
commit 0228989202

View File

@@ -6,18 +6,28 @@ describe('Login Component', () => {
cy.visit('/') cy.visit('/')
// Mock the API response for OIDC providers // Mock the API response for OIDC providers
cy.intercept('GET', '**/api/v1/oidc/enabled', { cy.intercept('GET', '**/api/v1/config', {
statusCode: 200, statusCode: 200,
body: { body: {
data: [ 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": [
{ {
id: 1, "client_id": "xx",
name: 'Google', "enabled": true,
logo_url: 'https://example.com/google-logo.png', "id": 1,
disabled: false "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') }).as('getOIDCProviders')
}) })