Smoke tests for verifying Cypress runs, plus basic API tests for health and sessions endpoints.
31 lines
969 B
JavaScript
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');
|
|
});
|
|
});
|
|
});
|
|
});
|