feat: 配方查询支持按精油名搜索
All checks were successful
Test / unit-test (push) Successful in 6s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 9s
Test / e2e-test (push) Successful in 3m1s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 20s
All checks were successful
Test / unit-test (push) Successful in 6s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 9s
Test / e2e-test (push) Successful in 3m1s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 20s
输入精油中文名/英文名会返回含该精油的所有配方。 中文查询 ≥2 字才匹配精油,避免「草」这样的单字噪音。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,14 @@ describe('Recipe Search', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('searching by oil name returns recipes containing that oil', () => {
|
||||
cy.get('input[placeholder*="搜索"]').type('薰衣草')
|
||||
cy.wait(500)
|
||||
cy.get('.search-results-section, .recipe-card', { timeout: 5000 }).should('exist')
|
||||
// At least one result card should exist (any recipe using 薰衣草)
|
||||
cy.get('.recipe-card').should('have.length.gte', 1)
|
||||
})
|
||||
|
||||
it('clears search and restores all recipes', () => {
|
||||
cy.get('.recipe-card', { timeout: 10000 }).should('have.length.gte', 1)
|
||||
cy.get('input[placeholder*="搜索"]').type('薰衣草')
|
||||
|
||||
Reference in New Issue
Block a user