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>
62 lines
2.1 KiB
JavaScript
62 lines
2.1 KiB
JavaScript
describe('App Loading', () => {
|
|
it('shows login overlay when not authenticated', () => {
|
|
cy.visit('/')
|
|
cy.get('.login-overlay').should('be.visible')
|
|
cy.contains('Hera\'s Planner').should('be.visible')
|
|
})
|
|
|
|
it('login overlay has password input and submit button', () => {
|
|
cy.visit('/')
|
|
cy.get('.login-input[type="password"]').should('be.visible')
|
|
cy.get('.login-btn').should('be.visible')
|
|
})
|
|
|
|
it('shows login error for wrong password', () => {
|
|
cy.visit('/')
|
|
cy.get('.login-input').type('wrongpassword')
|
|
cy.get('.login-btn').click()
|
|
cy.get('.login-error').should('not.be.empty')
|
|
})
|
|
|
|
it('loads main app after successful login', () => {
|
|
cy.visit('/', {
|
|
onBeforeLoad(win) {
|
|
win.localStorage.setItem('sp_login_expires', String(Date.now() + 86400000))
|
|
}
|
|
})
|
|
cy.get('.login-overlay').should('not.exist')
|
|
cy.get('header').should('be.visible')
|
|
cy.contains("Hera's Planner").should('be.visible')
|
|
})
|
|
|
|
it('shows all 7 navigation tabs', () => {
|
|
cy.visit('/', {
|
|
onBeforeLoad(win) {
|
|
win.localStorage.setItem('sp_login_expires', String(Date.now() + 86400000))
|
|
}
|
|
})
|
|
cy.get('.tab-btn').should('have.length', 7)
|
|
cy.get('.tab-btn').eq(0).should('contain', '随手记')
|
|
cy.get('.tab-btn').eq(1).should('contain', '待办')
|
|
cy.get('.tab-btn').eq(2).should('contain', '提醒')
|
|
cy.get('.tab-btn').eq(3).should('contain', '身体')
|
|
cy.get('.tab-btn').eq(4).should('contain', '音乐')
|
|
cy.get('.tab-btn').eq(5).should('contain', '文档')
|
|
cy.get('.tab-btn').eq(6).should('contain', '日程')
|
|
})
|
|
|
|
it('header menu button opens dropdown', () => {
|
|
cy.visit('/', {
|
|
onBeforeLoad(win) {
|
|
win.localStorage.setItem('sp_login_expires', String(Date.now() + 86400000))
|
|
}
|
|
})
|
|
cy.get('.header-menu-btn').click()
|
|
cy.get('.header-dropdown.open').should('be.visible')
|
|
cy.contains('退出登录').should('be.visible')
|
|
cy.contains('修改密码').should('be.visible')
|
|
cy.contains('导出数据').should('be.visible')
|
|
cy.contains('手动备份').should('be.visible')
|
|
})
|
|
})
|