Refactor to Vue 3 + FastAPI + SQLite architecture
Some checks failed
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>
This commit is contained in:
40
frontend/cypress/e2e/planning-review.cy.js
Normal file
40
frontend/cypress/e2e/planning-review.cy.js
Normal file
@@ -0,0 +1,40 @@
|
||||
describe('Planning - Review (日程-回顾)', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/planning', {
|
||||
onBeforeLoad(win) {
|
||||
win.localStorage.setItem('sp_login_expires', String(Date.now() + 86400000))
|
||||
}
|
||||
})
|
||||
cy.get('.sub-tab').contains('回顾').click()
|
||||
})
|
||||
|
||||
it('shows review form', () => {
|
||||
cy.contains('本周回顾').should('be.visible')
|
||||
cy.get('.review-form textarea').should('have.length', 3)
|
||||
})
|
||||
|
||||
it('review form has 3 sections', () => {
|
||||
cy.contains('本周做得好的').should('be.visible')
|
||||
cy.contains('需要改进的').should('be.visible')
|
||||
cy.contains('下周计划').should('be.visible')
|
||||
})
|
||||
|
||||
it('saves a review', () => {
|
||||
cy.get('.review-form textarea').eq(0).type('完成了重构')
|
||||
cy.get('.review-form textarea').eq(1).type('睡眠不够')
|
||||
cy.get('.review-form textarea').eq(2).type('早睡早起')
|
||||
cy.get('.btn-accent').contains('保存回顾').click()
|
||||
// Should save without error
|
||||
cy.get('.review-form').should('be.visible')
|
||||
})
|
||||
|
||||
it('shows history section toggle', () => {
|
||||
cy.contains('历史回顾').should('be.visible')
|
||||
})
|
||||
|
||||
it('toggles history visibility', () => {
|
||||
cy.contains('历史回顾').click()
|
||||
// After click, should toggle visibility
|
||||
cy.contains('历史回顾').should('be.visible')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user