Some checks failed
- Backend: FastAPI + SQLite (WAL mode), 22 tables, ~40 API endpoints - Frontend: Vue 3 + Vite + Pinia + Vue Router, 8 views, 3 stores - Database: migrate from JSON file to SQLite with proper schema - Dockerfile: multi-stage build (node + python) - Deploy: K8s manifests (namespace, deployment, service, ingress, pvc, backup) - CI/CD: Gitea Actions (test, deploy, PR preview at pr-$id.planner.oci.euphon.net) - Tests: 20 Cypress E2E test files, 196 test cases, ~85% coverage - Doc: test-coverage.md with full feature coverage report Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
154 lines
4.0 KiB
JavaScript
154 lines
4.0 KiB
JavaScript
describe('API Health', () => {
|
|
it('GET /api/notes returns array', () => {
|
|
cy.request('/api/notes').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/todos returns array', () => {
|
|
cy.request('/api/todos').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/inbox returns array', () => {
|
|
cy.request('/api/inbox').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/reminders returns array', () => {
|
|
cy.request('/api/reminders').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/goals returns array', () => {
|
|
cy.request('/api/goals').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/checklists returns array', () => {
|
|
cy.request('/api/checklists').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/sleep returns array', () => {
|
|
cy.request('/api/sleep').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/gym returns array', () => {
|
|
cy.request('/api/gym').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/period returns array', () => {
|
|
cy.request('/api/period').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/docs returns array', () => {
|
|
cy.request('/api/docs').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/bugs returns array', () => {
|
|
cy.request('/api/bugs').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/reviews returns array', () => {
|
|
cy.request('/api/reviews').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/schedule-modules returns array', () => {
|
|
cy.request('/api/schedule-modules').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/schedule-slots returns array', () => {
|
|
cy.request('/api/schedule-slots').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/weekly-template returns array', () => {
|
|
cy.request('/api/weekly-template').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/health-items returns array', () => {
|
|
cy.request('/api/health-items?type=health').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/health-plans returns array', () => {
|
|
cy.request('/api/health-plans?type=health').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/health-checks returns array', () => {
|
|
cy.request('/api/health-checks?type=health').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/backups returns array', () => {
|
|
cy.request('/api/backups').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.be.an('array')
|
|
})
|
|
})
|
|
|
|
it('GET /api/sleep-buddy returns buddy data', () => {
|
|
cy.request('/api/sleep-buddy').then(res => {
|
|
expect(res.status).to.eq(200)
|
|
expect(res.body).to.have.property('users')
|
|
expect(res.body).to.have.property('notifications')
|
|
})
|
|
})
|
|
|
|
it('POST /api/login rejects wrong password', () => {
|
|
cy.request({
|
|
method: 'POST',
|
|
url: '/api/login',
|
|
body: { hash: 'wrong_hash' },
|
|
failOnStatusCode: false,
|
|
}).then(res => {
|
|
expect(res.status).to.eq(401)
|
|
})
|
|
})
|
|
})
|