From ca17101d8328623452d9371ff1ee711ad6777a2b Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 11 Dec 2024 17:04:45 +0100 Subject: [PATCH] fix: remove cy test that clears the org unit --- cypress/e2e/ScopeSelector/ScopeSelector.feature | 5 ----- cypress/e2e/ScopeSelector/ScopeSelector.js | 15 --------------- 2 files changed, 20 deletions(-) diff --git a/cypress/e2e/ScopeSelector/ScopeSelector.feature b/cypress/e2e/ScopeSelector/ScopeSelector.feature index 5a06714422..5a6d4f0b83 100644 --- a/cypress/e2e/ScopeSelector/ScopeSelector.feature +++ b/cypress/e2e/ScopeSelector/ScopeSelector.feature @@ -221,11 +221,6 @@ Feature: User uses the ScopeSelector to navigate When you reset the program selection Then you see message explaining you need to select a program - Scenario: Enrollment event new page > resetting the org unit - Given you land on a enrollment page domain by having typed /#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=UgYg0YW7ZIh&teiId=fhFQhO0xILJ&enrollmentId=gPDueU02tn8&stageId=A03MvHHogjR - When you reset the org unit selection - Then you see the enrollment event New page but there is no org unit id in the url - Scenario: Enrollment event new page > resetting the enrollment Given you land on a enrollment page domain by having typed /#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=UgYg0YW7ZIh&teiId=fhFQhO0xILJ&enrollmentId=gPDueU02tn8&stageId=A03MvHHogjR When you reset the enrollment selection diff --git a/cypress/e2e/ScopeSelector/ScopeSelector.js b/cypress/e2e/ScopeSelector/ScopeSelector.js index 65bd9930f3..27670e24f1 100644 --- a/cypress/e2e/ScopeSelector/ScopeSelector.js +++ b/cypress/e2e/ScopeSelector/ScopeSelector.js @@ -1,11 +1,6 @@ import { defineStep as And, Given, Then, When } from '@badeball/cypress-cucumber-preprocessor'; import { getCurrentYear } from '../../support/date'; -Given(/^you land on a enrollment page domain by having typed (.*)$/, (url) => { - cy.visit(url); - cy.get('[data-test="person-selector-container"]').contains('Person'); -}); - Given(/^you land on a enrollment page domain in Malaria focus investigation by having typed (.*)$/, (url) => { cy.visit(url); cy.get('[data-test="focus area-selector-container"]').contains('Focus area'); @@ -194,11 +189,6 @@ When('you remove the program selection', () => { .click(); }); -When('you remove the org unit selection', () => { - cy.get('[data-test="org-unit-selector-container-clear-icon"]') - .click(); -}); - Then('you should be taken to the main page with only org unit selected', () => { cy.url().should('eq', `${Cypress.config().baseUrl}/#/?orgUnitId=DiszpKrYNg8`); }); @@ -290,11 +280,6 @@ And('you see the enrollment event Edit page but there is no org unit id in the u cy.get('[data-test="widget-enrollment-event-view"]').should('exist'); }); -And('you see the enrollment event New page but there is no org unit id in the url', () => { - cy.url().should('eq', `${Cypress.config().baseUrl}/#/enrollmentEventNew?enrollmentId=gPDueU02tn8&programId=IpHINAT79UW&stageId=A03MvHHogjR&teiId=fhFQhO0xILJ`); - cy.contains('Choose an organisation unit to start reporting'); -}); - And('you see the enrollment event New page but there is no stage id in the url', () => { cy.url().should('eq', `${Cypress.config().baseUrl}/#/enrollmentEventNew?enrollmentId=gPDueU02tn8&orgUnitId=UgYg0YW7ZIh&programId=IpHINAT79UW&teiId=fhFQhO0xILJ`); cy.contains('Choose a stage for a new event');