From f89cfff20b8db4be2bec377a3886a4185927a249 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Tue, 7 Apr 2026 20:51:27 +0000 Subject: [PATCH] Fix E2E tests to match restored modal overlay UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- frontend/cypress/e2e/recipe-detail.cy.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/cypress/e2e/recipe-detail.cy.js b/frontend/cypress/e2e/recipe-detail.cy.js index bdda469..d3f474c 100644 --- a/frontend/cypress/e2e/recipe-detail.cy.js +++ b/frontend/cypress/e2e/recipe-detail.cy.js @@ -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', () => {