Fix E2E tests to match restored modal overlay UI
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 18s
Test / e2e-test (push) Successful in 1m1s

The recipe detail was reverted to modal with tabs (卡片预览/编辑),
so tests now click the 编辑 tab before checking for editor elements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 20:51:27 +00:00
parent 6563a6f7d2
commit f89cfff20b

View File

@@ -59,16 +59,18 @@ describe('Recipe Detail - Editor (Admin)', () => {
cy.get('.recipe-card', { timeout: 10000 }).should('have.length.gte', 1)
})
it('shows editable ingredients table directly', () => {
it('shows editable ingredients table in editor tab', () => {
cy.get('.recipe-card').first().click()
cy.wait(500)
cy.get('.oil-select, .drops-input').should('exist')
cy.contains('编辑').click()
cy.get('.editor-select, .editor-drops').should('exist')
})
it('shows add ingredient button', () => {
it('shows add ingredient button in editor tab', () => {
cy.get('.recipe-card').first().click()
cy.wait(500)
cy.contains('加精油').should('exist')
cy.contains('编辑').click()
cy.contains('添加精油').should('exist')
})
it('shows export image button', () => {