test: add initial Cypress e2e test infrastructure

Smoke tests for verifying Cypress runs, plus basic API tests
for health and sessions endpoints.
This commit is contained in:
2026-02-15 23:05:56 +01:00
parent 3feedd5698
commit 991080ae2b
6 changed files with 2333 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
/// <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');
});
});
});
});