- Replace single-file 8441-line HTML with Vue 3 SPA - Pinia stores: auth, oils, recipes, diary, ui - Composables: useApi, useDialog, useSmartPaste, useOilTranslation - 6 shared components: RecipeCard, RecipeDetailOverlay, TagPicker, etc. - 9 page views: RecipeSearch, RecipeManager, Inventory, OilReference, etc. - 14 Cypress E2E test specs (113 tests), all passing - Multi-stage Dockerfile (Node build + Python runtime) - Demo video generation scripts (TTS + subtitles + screen recording) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
describe('App Loading', () => {
|
|
it('loads the home page with header and nav', () => {
|
|
cy.visit('/')
|
|
cy.get('.app-header').should('be.visible')
|
|
cy.contains('doTERRA 配方计算器').should('be.visible')
|
|
cy.get('.nav-tabs').should('be.visible')
|
|
cy.get('.nav-tab').should('have.length.gte', 4)
|
|
})
|
|
|
|
it('shows the search section by default', () => {
|
|
cy.visit('/')
|
|
cy.get('.nav-tab').first().should('have.class', 'active')
|
|
cy.get('input[placeholder*="搜索"]', { timeout: 8000 }).should('be.visible')
|
|
})
|
|
|
|
it('navigates between public tabs without login', () => {
|
|
cy.visit('/')
|
|
cy.get('.nav-tab').contains('精油价目').click()
|
|
cy.url().should('include', '/oils')
|
|
cy.contains('精油价目').should('be.visible')
|
|
|
|
cy.get('.nav-tab').contains('配方查询').click()
|
|
cy.url().should('not.include', '/oils')
|
|
})
|
|
|
|
it('prompts login when accessing protected tabs', () => {
|
|
cy.visit('/')
|
|
cy.get('.nav-tab').contains('管理配方').click()
|
|
// Should show login modal or dialog
|
|
cy.get('[class*="overlay"], [class*="login"], [class*="modal"], [class*="dialog"]', { timeout: 3000 }).should('exist')
|
|
})
|
|
})
|