From 79800251b7dd33a710a6283a02384427fd9d76ce Mon Sep 17 00:00:00 2001 From: Simona Domnisoru Date: Wed, 21 Aug 2024 15:29:39 +0200 Subject: [PATCH] chore: adapt the transfer scenario to the newly added API restrictions --- .../WidgetsForEnrollmentPages/WidgetEnrollment/index.js | 8 +++++++- .../WidgetsForEnrollmentDashboard.feature | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js index e88dae07c5..7ad8539f77 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js @@ -232,11 +232,17 @@ Then(/^the user successfully transfers the enrollment/, () => { cy.get('[data-test="widget-enrollment"]').within(() => { cy.get('[data-test="widget-enrollment-owner-orgunit"]') - .contains('Owned by Sierra Leone') + .contains('Owned by Njandama MCHP') .should('exist'); }); }); +Then(/^the user types in (.*)/, (orgunit) => { + cy.get('[data-test="widget-enrollment-transfer-modal"]').within(() => { + cy.get('[data-test="capture-ui-input"]').type(orgunit); + }); +}); + Given(/^the enrollment owner organisation unit is (.*)/, (orgunit) => { cy.get('[data-test="widget-enrollment"]').within(() => { cy.get('[data-test="widget-enrollment-owner-orgunit"]') diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature index 724567d75d..ffd0a56c1c 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature @@ -26,7 +26,8 @@ Feature: The user interacts with the widgets on the enrollment dashboard And the user clicks on the transfer action And the user sees the transfer modal And the user sees the organisation unit tree - When the user clicks on the organisation unit with text: Sierra Leone + And the user types in Njandama MCHP + When the user clicks on the organisation unit with text: Njandama MCHP Then the user successfully transfers the enrollment # Scenarios linked to the enrollment dashboard