Fix CI: exclude demo/visual specs, fix oil-card→oil-chip selectors
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Has been cancelled
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Has been cancelled
- Grep pattern now matches full filenames (demo-walkthrough, visual-check) - Updated all test files to use .oil-chip (new OilReference class name) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
describe('Oil Reference Page', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/oils')
|
||||
cy.get('.oil-card, .oils-grid', { timeout: 10000 }).should('exist')
|
||||
cy.get('.oil-chip, .oils-grid', { timeout: 10000 }).should('exist')
|
||||
})
|
||||
|
||||
it('displays oil grid with items', () => {
|
||||
cy.contains('精油价目').should('be.visible')
|
||||
cy.get('.oil-card').should('have.length.gte', 10)
|
||||
cy.get('.oil-chip').should('have.length.gte', 10)
|
||||
})
|
||||
|
||||
it('shows oil name and price on each chip', () => {
|
||||
cy.get('.oil-card').first().should('contain', '¥')
|
||||
cy.get('.oil-chip').first().should('contain', '¥')
|
||||
})
|
||||
|
||||
it('filters oils by search', () => {
|
||||
cy.get('.oil-card').then($chips => {
|
||||
cy.get('.oil-chip').then($chips => {
|
||||
const initial = $chips.length
|
||||
cy.get('input[placeholder*="搜索精油"]').type('薰衣草')
|
||||
cy.wait(300)
|
||||
cy.get('.oil-card').should('have.length.lt', initial)
|
||||
cy.get('.oil-chip').should('have.length.lt', initial)
|
||||
})
|
||||
})
|
||||
|
||||
it('toggles between bottle and drop price view', () => {
|
||||
cy.get('.oil-card').first().invoke('text').then(textBefore => {
|
||||
cy.get('.oil-chip').first().invoke('text').then(textBefore => {
|
||||
cy.contains('滴价').click()
|
||||
cy.wait(300)
|
||||
cy.get('.oil-card').first().invoke('text').should('not.eq', textBefore)
|
||||
cy.get('.oil-chip').first().invoke('text').should('not.eq', textBefore)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user