Smoke tests for verifying Cypress runs, plus basic API tests for health and sessions endpoints.
59 lines
2.0 KiB
JavaScript
59 lines
2.0 KiB
JavaScript
/// <reference types="cypress" />
|
|
|
|
/**
|
|
* Smoke test to verify that the Cypress test infrastructure is
|
|
* correctly installed and configured. These tests do NOT require
|
|
* the lovdata-chat stack to be running.
|
|
*/
|
|
describe('Cypress Infrastructure Smoke Test', () => {
|
|
it('should execute a basic assertion', () => {
|
|
expect(true).to.be.true;
|
|
});
|
|
|
|
it('should handle arrays and objects', () => {
|
|
const session = {
|
|
id: 'test-session-001',
|
|
status: 'running',
|
|
model: 'opencode/kimi-k2.5-free',
|
|
};
|
|
|
|
expect(session).to.have.property('id');
|
|
expect(session.status).to.eq('running');
|
|
expect(session.model).to.include('kimi');
|
|
});
|
|
|
|
it('should validate the allowed models whitelist structure', () => {
|
|
const allowedModels = [
|
|
{
|
|
id: 'opencode/kimi-k2.5-free',
|
|
display_name: 'Kimi K2.5',
|
|
provider: 'zen',
|
|
is_reasoning: false,
|
|
is_default: true,
|
|
},
|
|
{
|
|
id: 'anthropic/claude-sonnet-4-thinking',
|
|
display_name: 'Claude Sonnet 4 (Thinking)',
|
|
provider: 'zen',
|
|
is_reasoning: true,
|
|
thinking_budget_default: 10000,
|
|
thinking_budget_max: 50000,
|
|
},
|
|
];
|
|
|
|
expect(allowedModels).to.have.length(2);
|
|
|
|
const defaultModel = allowedModels.find((m) => m.is_default);
|
|
expect(defaultModel).to.exist;
|
|
expect(defaultModel.id).to.eq('opencode/kimi-k2.5-free');
|
|
|
|
const reasoningModels = allowedModels.filter((m) => m.is_reasoning);
|
|
expect(reasoningModels).to.have.length(1);
|
|
expect(reasoningModels[0]).to.have.property('thinking_budget_default');
|
|
expect(reasoningModels[0]).to.have.property('thinking_budget_max');
|
|
expect(reasoningModels[0].thinking_budget_max).to.be.greaterThan(
|
|
reasoningModels[0].thinking_budget_default
|
|
);
|
|
});
|
|
});
|