Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [DHIS2-18736] fix Cypress tests broken due to the change of year #3933

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Feature: User interacts with Stages and Events Widget

@with-restore-deleted-event
Scenario: User can delete an event
Given you open the enrollment page by typing #/enrollment?enrollmentId=ikYMpSKXik1&orgUnitId=DiszpKrYNg8&programId=ur1Edk5Oe2n&teiId=Trc1H9T5C6f
Given you open the enrollment page by typing #/enrollment?enrollmentId=ITyaPVATEwc&orgUnitId=DiszpKrYNg8&programId=ur1Edk5Oe2n&teiId=wsk89u7zquT
And there is an Active event in the TB visit stage
When you click the Delete event overflow button on the Active event
And you confirm you want to delete the event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getCurrentYear } from '../../../support/date';
import '../sharedSteps';

After({ tags: '@with-restore-deleted-event' }, () => {
cy.visit('#/enrollment?enrollmentId=ikYMpSKXik1&orgUnitId=DiszpKrYNg8&programId=ur1Edk5Oe2n&teiId=Trc1H9T5C6f');
cy.visit('#/enrollment?enrollmentId=ITyaPVATEwc&orgUnitId=DiszpKrYNg8&programId=ur1Edk5Oe2n&teiId=wsk89u7zquT');

cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
Expand Down Expand Up @@ -215,7 +215,7 @@ When(/you click the (.*) event overflow button on the (.*) event$/, (buttonName,

cy.get('[data-test="overflow-menu"]')
.contains(buttonName)
.click();
.click({ force: true });
});

Then('the event should be skipped', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ After({ tags: '@with-transfer-ownership-data-cleanup' }, () => {
});

const changeEnrollmentAndEventsStatus = () => (
cy.buildApiUrl('tracker', 'trackedEntities/osF4RF4EiqP?program=IpHINAT79UW&fields=enrollments')
cy.buildApiUrl('tracker', 'trackedEntities/mPLqCVS27AD?program=IpHINAT79UW&fields=enrollments')
.then(url => cy.request(url))
.then(({ body }) => {
const enrollment = body.enrollments && body.enrollments.find(e => e.enrollment === 'qyx7tscVpVB');
const enrollment = body.enrollments && body.enrollments.find(e => e.enrollment === 'YqNTNLKmX4z');
const eventsToUpdate = enrollment.events.map(e => ({
...e,
status: 'ACTIVE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Feature: The user interacts with the widgets on the enrollment add event page
Then you can assign a user when scheduling the event

Scenario: User can complete the enrollment and the active events
Given you land on the enrollment edit event page by having typed #/enrollmentEventNew?enrollmentId=qyx7tscVpVB&orgUnitId=DiszpKrYNg8&programId=IpHINAT79UW&teiId=osF4RF4EiqP
Given you land on the enrollment edit event page by having typed #/enrollmentEventNew?enrollmentId=YqNTNLKmX4z&orgUnitId=RzgSFJ9E46G&programId=IpHINAT79UW&teiId=mPLqCVS27AD
And the enrollment widget should be opened
And the user sees the enrollment status and the Baby Postnatal event status is active
And the user opens the enrollment actions menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Feature: The user interacts with the widgets on the enrollment dashboard
Then the user can see the program rules effect in the indicator widget

Scenario: User can complete the enrollment and the active events
Given you land on the enrollment dashboard page by having typed #/enrollment?enrollmentId=qyx7tscVpVB
Given you land on the enrollment dashboard page by having typed #/enrollment?enrollmentId=YqNTNLKmX4z
And the enrollment widget should be opened
And the user sees the enrollment status and the Baby Postnatal event status is active
And the user opens the enrollment actions menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Feature: The user interacts with the widgets on the enrollment edit event
Then the table footer should display page 2

Scenario: User can complete the enrollment and the active events
Given you land on the enrollment edit event page by having typed #/enrollmentEventEdit?eventId=OWpIzQ4xabC&orgUnitId=DiszpKrYNg8
Given you land on the enrollment edit event page by having typed #/enrollmentEventEdit?eventId=PyXThVzWJzL&orgUnitId=RzgSFJ9E46G
And the enrollment widget should be opened
And the user sees the enrollment status and the Baby Postnatal event status is active
And the user opens the enrollment actions menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Feature: User facing tests for bulk actions on Tracked Entity working lists
When you select the first 5 rows
Then the filters should be disabled

#DHIS2-18447
@skip
Scenario: The user should see an error message when trying to bulk complete enrollments with errors
Given you open the main page with Ngelehun and Malaria focus investigation context
And you select the first 3 rows
Expand Down
Loading