test: 智能识别与英文名搜索的单测 + e2e
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 6s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 16s
Test / e2e-test (push) Failing after 6m2s
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 6s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 16s
Test / e2e-test (push) Failing after 6m2s
- 将粘贴解析抽到 useOilProductPaste composable - 8 条 vitest 覆盖价格/规格/中英文名/类型判断 - 2 条 cypress 覆盖 UI 填充(产品 100ml、精油 15ml) - 补英文名搜索 e2e;旧 search 用例 placeholder 选择器宽松化 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,12 +16,22 @@ describe('Oil Reference Page', () => {
|
||||
it('filters oils by search', () => {
|
||||
cy.get('.oil-chip').then($chips => {
|
||||
const initial = $chips.length
|
||||
cy.get('input[placeholder*="搜索精油"]').type('薰衣草')
|
||||
cy.get('input[placeholder*="搜索"]').type('薰衣草')
|
||||
cy.wait(300)
|
||||
cy.get('.oil-chip').should('have.length.lt', initial)
|
||||
})
|
||||
})
|
||||
|
||||
it('filters oils by english name', () => {
|
||||
cy.get('.oil-chip').then($chips => {
|
||||
const initial = $chips.length
|
||||
cy.get('input[placeholder*="搜索"]').type('Lavender')
|
||||
cy.wait(300)
|
||||
cy.get('.oil-chip').should('have.length.lt', initial)
|
||||
cy.get('.oil-chip').should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
it('toggles between bottle and drop price view', () => {
|
||||
cy.get('.oil-chip').first().invoke('text').then(textBefore => {
|
||||
cy.contains('滴价').click()
|
||||
|
||||
Reference in New Issue
Block a user