Files
lovdata-chat/cypress/e2e/api/health.cy.js
Torbjørn Lindahl 991080ae2b test: add initial Cypress e2e test infrastructure
Smoke tests for verifying Cypress runs, plus basic API tests
for health and sessions endpoints.
2026-02-15 23:05:56 +01:00

31 lines
969 B
JavaScript

/// <reference types="cypress" />
describe('Session Manager API', () => {
describe('Health Check', () => {
it('should respond to the health endpoint', () => {
cy.request({
method: 'GET',
url: '/api/health',
failOnStatusCode: false,
}).then((response) => {
// The endpoint should exist and return a response
expect(response.status).to.be.oneOf([200, 503]);
expect(response.body).to.be.an('object');
});
});
});
describe('Sessions API', () => {
it('should list sessions', () => {
cy.request({
method: 'GET',
url: '/api/sessions',
failOnStatusCode: false,
}).then((response) => {
expect(response.status).to.eq(200);
expect(response.body).to.be.an('object');
});
});
});
});