diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEventNote/index.js b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEventNote/index.js index 2a1c5200ef..72680e4d35 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEventNote/index.js +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEventNote/index.js @@ -5,7 +5,9 @@ Then('the enrollment widget should be loaded', () => { }); When('you click edit mode', () => { - cy.contains('[data-test="dhis2-uicore-button"]', 'Edit event') + cy + .get('[data-test="widget-enrollment-event"]') + .find('[data-test="widget-enrollment-event-edit-button"]') .click(); cy.contains('Enrollment: Edit Event').should('exist'); });