Fix reminders-flow.cy.js: use parents() instead of parent()
Some checks failed
Some checks failed
The .remove-btn is nested inside .reminder-main, not a direct child
of the element containing the text. Use .parents('.reminder-card')
to traverse up to the correct ancestor.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,7 @@ describe('Reminders (提醒)', () => {
|
|||||||
cy.get('.btn-accent').contains('新提醒').click()
|
cy.get('.btn-accent').contains('新提醒').click()
|
||||||
cy.get('.edit-form input').first().type('待删除提醒')
|
cy.get('.edit-form input').first().type('待删除提醒')
|
||||||
cy.get('.btn-accent').contains('保存').click()
|
cy.get('.btn-accent').contains('保存').click()
|
||||||
cy.get('.reminder-card').contains('待删除提醒').parent().find('.remove-btn').click()
|
cy.get('.reminder-card').contains('待删除提醒').parents('.reminder-card').find('.remove-btn').click()
|
||||||
cy.get('.reminder-card').should('not.contain', '待删除提醒')
|
cy.get('.reminder-card').should('not.contain', '待删除提醒')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user