Files
schedule-planner/frontend/cypress/e2e/planning-template.cy.js
Hera Zhao d3f3b4f37b
Some checks failed
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 3s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / e2e-test (push) Failing after 55s
PR Preview / deploy-preview (pull_request) Failing after 40s
Refactor to Vue 3 + FastAPI + SQLite architecture
- 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>
2026-04-07 21:18:22 +00:00

31 lines
951 B
JavaScript

describe('Planning - Template (日程-模板)', () => {
beforeEach(() => {
cy.visit('/planning', {
onBeforeLoad(win) {
win.localStorage.setItem('sp_login_expires', String(Date.now() + 86400000))
}
})
cy.get('.sub-tab').contains('模板').click()
})
it('shows 7 day buttons', () => {
cy.get('.day-btn').should('have.length', 7)
cy.get('.day-btn').eq(0).should('contain', '周一')
cy.get('.day-btn').eq(6).should('contain', '周日')
})
it('defaults to 周二 (index 1) as selected', () => {
cy.get('.day-btn').eq(1).should('have.class', 'active')
})
it('switches between days', () => {
cy.get('.day-btn').contains('周五').click()
cy.get('.day-btn').contains('周五').should('have.class', 'active')
cy.get('.day-btn').contains('周二').should('not.have.class', 'active')
})
it('shows template hint', () => {
cy.get('.template-hint').should('be.visible')
})
})