Skip to content

Commit

Permalink
Merge branch 'master' into hv/feat/DHIS2-18017_AbilityToUnlinkEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv authored Dec 5, 2024
2 parents 1a3db3f + 416cfa4 commit 87f249a
Show file tree
Hide file tree
Showing 305 changed files with 14,915 additions and 5,400 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
lint-pr-title:
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'dhis2-bot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,6 +19,7 @@ jobs:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

lint-commits:
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'dhis2-bot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
106 changes: 106 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,109 @@
## [101.19.1](https://github.com/dhis2/capture-app/compare/v101.19.0...v101.19.1) (2024-12-05)


### Bug Fixes

* [DHIS2-17854] validate the assigned values from rules engine ([#3783](https://github.com/dhis2/capture-app/issues/3783)) ([db9d6b8](https://github.com/dhis2/capture-app/commit/db9d6b8f23fb29af30ef61fb3649c167073a46ff))

# [101.19.0](https://github.com/dhis2/capture-app/compare/v101.18.1...v101.19.0) (2024-12-03)


### Features

* [DHIS2-15462] Use dhis2 UI calendarinput component in forms ([#3658](https://github.com/dhis2/capture-app/issues/3658)) ([f39fd47](https://github.com/dhis2/capture-app/commit/f39fd471cb2f176a417667481b17a72b2d4651dd))

## [101.18.1](https://github.com/dhis2/capture-app/compare/v101.18.0...v101.18.1) (2024-12-03)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([a2d43b2](https://github.com/dhis2/capture-app/commit/a2d43b2db7b926066a438d6f5f42ad19d37987fe))

# [101.18.0](https://github.com/dhis2/capture-app/compare/v101.17.0...v101.18.0) (2024-11-28)


### Features

* [DHIS2-16337] Org unit in view event page ([#3882](https://github.com/dhis2/capture-app/issues/3882)) ([c605e82](https://github.com/dhis2/capture-app/commit/c605e828622aa9f9b0c10f96359ba1b037c8e0ee))

# [101.17.0](https://github.com/dhis2/capture-app/compare/v101.16.7...v101.17.0) (2024-11-25)


### Features

* [DHIS2-15463] Use dhis2 ui calendarInput component in working list ([#3712](https://github.com/dhis2/capture-app/issues/3712)) ([5f27455](https://github.com/dhis2/capture-app/commit/5f27455b136d6d994adea0788bf2d0683dfe5d06))

## [101.16.7](https://github.com/dhis2/capture-app/compare/v101.16.6...v101.16.7) (2024-11-25)


### Bug Fixes

* [DHIS2-16801] events scheduled for today's date not showing today ([#3856](https://github.com/dhis2/capture-app/issues/3856)) ([d63e124](https://github.com/dhis2/capture-app/commit/d63e124d1c0702898b453be8cfbdd0a5f4620ba5))

## [101.16.6](https://github.com/dhis2/capture-app/compare/v101.16.5...v101.16.6) (2024-11-25)


### Bug Fixes

* [DHIS2-17519] app crashing when opening new event from view event ([#3781](https://github.com/dhis2/capture-app/issues/3781)) ([93366ef](https://github.com/dhis2/capture-app/commit/93366ef504210cc9aa746f7d10a4cc7d6188586d))
* [DHIS2-18150] user has to click out of range filter for update button to trigger ([#3855](https://github.com/dhis2/capture-app/issues/3855)) ([f70b205](https://github.com/dhis2/capture-app/commit/f70b2053f753388e994c89698677821fd8032f79))

## [101.16.5](https://github.com/dhis2/capture-app/compare/v101.16.4...v101.16.5) (2024-11-24)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([3098faf](https://github.com/dhis2/capture-app/commit/3098faf8b73dbfc0d894535cbdfd5539e80a24fe))

## [101.16.4](https://github.com/dhis2/capture-app/compare/v101.16.3...v101.16.4) (2024-11-20)


### Bug Fixes

* [DHIS2-18019] related stages UI tweaks ([#3872](https://github.com/dhis2/capture-app/issues/3872)) ([7ea2240](https://github.com/dhis2/capture-app/commit/7ea2240b68408a0c4e8db624093c058f2b416584))

## [101.16.3](https://github.com/dhis2/capture-app/compare/v101.16.2...v101.16.3) (2024-11-20)


### Bug Fixes

* [DHIS2-18444] stabilize possible duplicate modal cypress test ([#3886](https://github.com/dhis2/capture-app/issues/3886)) ([5b5b477](https://github.com/dhis2/capture-app/commit/5b5b477ed3a26c7eb04c4966802769fe973e1631))

## [101.16.2](https://github.com/dhis2/capture-app/compare/v101.16.1...v101.16.2) (2024-11-19)


### Bug Fixes

* [DHIS2-16994] Image and File DE and TEA not Displayed in Changelog ([#3837](https://github.com/dhis2/capture-app/issues/3837)) ([9327210](https://github.com/dhis2/capture-app/commit/932721045126e02379f56a85af4f6586b836b4c0))

## [101.16.1](https://github.com/dhis2/capture-app/compare/v101.16.0...v101.16.1) (2024-11-17)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([37c32df](https://github.com/dhis2/capture-app/commit/37c32df3e7839e30b493ff8e8185de769c3e2fd4))

# [101.16.0](https://github.com/dhis2/capture-app/compare/v101.15.0...v101.16.0) (2024-11-13)


### Features

* [DHIS2-18250] Breadcrumb for event & enrollment pages ([#3849](https://github.com/dhis2/capture-app/issues/3849)) ([d65882e](https://github.com/dhis2/capture-app/commit/d65882eacb711865d9f6a860c65d56a0f4d68157))

# [101.15.0](https://github.com/dhis2/capture-app/compare/v101.14.9...v101.15.0) (2024-11-12)


### Features

* [DHIS2-15187][DHIS2-15190] Working list bulk actions ([#3773](https://github.com/dhis2/capture-app/issues/3773)) ([5a12722](https://github.com/dhis2/capture-app/commit/5a127229e984b744fa3ea486d9b5a2632603bcd4))

## [101.14.9](https://github.com/dhis2/capture-app/compare/v101.14.8...v101.14.9) (2024-11-10)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([00403fb](https://github.com/dhis2/capture-app/commit/00403fb596e08eba233fd4103c66c66f286a0881))

## [101.14.8](https://github.com/dhis2/capture-app/compare/v101.14.7...v101.14.8) (2024-11-05)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Feature: User interacts with the Enrollment New Event Workspace

Scenario: User should be asked to create new event after completing a stage and choose to cancel
Given you land on the enrollment new event page by having typed #/enrollmentEventNew?enrollmentId=zRfAPUpjoG3&orgUnitId=DiszpKrYNg8&programId=M3xtLkYBlKI&stageId=CWaAcQYKVpq&teiId=S3JjTA4QMNe
Then you see the following Enrollment: New Event
Then you see the new event form
And you see the widget header Foci investigation & classification
And you type 2022-01-01 in the input number 0
And you type x in the input number 20
Expand All @@ -62,7 +62,7 @@ Feature: User interacts with the Enrollment New Event Workspace

Scenario: User should be asked to create new event after completing a stage and choose to continue
Given you land on the enrollment new event page by having typed #/enrollmentEventNew?enrollmentId=zRfAPUpjoG3&orgUnitId=DiszpKrYNg8&programId=M3xtLkYBlKI&stageId=CWaAcQYKVpq&teiId=S3JjTA4QMNe
Then you see the following Enrollment: New Event
Then you see the new event form
And you see the widget header Foci investigation & classification
And you type 2022-01-01 in the input number 0
And you type x in the input number 20
Expand All @@ -74,7 +74,7 @@ Feature: User interacts with the Enrollment New Event Workspace

Scenario: User is able to schedule an event with a note
Given you land on the enrollment new event page by having typed /#/enrollmentEventNew?enrollmentId=qcFFRp7DpcX&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&stageId=edqlbukwRfQ&teiId=erqa3phUfpI
And you see the following Enrollment: New Event
And you see the new event form
And you select the schedule tab
When you add a note to the event
And the events saves successfully
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ When(/^you click the create new button number (.*)$/, (eq) => {
});

When(/^you type (.*) in the input number (.*)$/, (value, eq) => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(eq)
.type(value)
.blur();
Expand Down Expand Up @@ -155,7 +155,7 @@ When(/^the user selects (.*)$/, (value) => {
});

When(/^you focus and blur a required field/, () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.focus()
.blur();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: User interacts with Enrollment Add event page
Scenario: The user can land on the enrollment add event page.
Given you land on the enrollment add event page by having typed /#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8&teiId=tIJu6iqQxNV&enrollmentId=CCBLMntFuzb&stageId=A03MvHHogjR
Then you see the following Enrollment: New Event
Then you see the new event form
And you see the widget header Birth
And you see the following Report date
And you see the add event form details
6 changes: 5 additions & 1 deletion cypress/e2e/EnrollmentAddEventPage/sharedSteps.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Then, defineStep as And } from '@badeball/cypress-cucumber-preprocessor';
import { defineStep as And, Then, When } from '@badeball/cypress-cucumber-preprocessor';

Then(/^you see the following (.*)$/, (message) => {
cy.contains(message);
Expand All @@ -12,3 +12,7 @@ And(/^you see the widget header (.*)$/, (name) => {
cy.contains(name).should('exist');
});
});

When('you see the new event form', () => {
cy.get('[data-test="new-enrollment-event-form"]').should('exist');
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ And the user see the following text: Yes

Scenario: The user can enter and exit the edit mode.
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?orgUnitId=DiszpKrYNg8&eventId=V1CerIi3sdL
And the user see the following text: Enrollment: View Event
And the view enrollment event form is in view mode
And the user see the following text: Apgar Score
When the user clicks on the edit button
Then the user see the following text: Enrollment: Edit Event
Then the view enrollment event form is in edit mode
When the user clicks on the cancel button
And the user see the following text: Enrollment: View Event
And the view enrollment event form is in view mode

Scenario: The tracker program rules are triggered correctly for the Child Program.
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?orgUnitId=DiszpKrYNg8&eventId=V1CerIi3sdL
Expand All @@ -53,58 +53,58 @@ Then the user don't see the following text: Low-dose acetylsalicylic acid given

Scenario: User can modify and save the data in the form
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?orgUnitId=DiszpKrYNg8&eventId=V1CerIi3sdL
Then the user see the following text: Enrollment: View Event
Then the view enrollment event form is in view mode
And the apgar score is 11
When the user clicks on the edit button
And the user set the apgar score to 5
And the user clicks on the save button
Then you are redirected to the enrollment dashboard
And you open the Birth stage event
Then the user see the following text: Enrollment: View Event
Then the view enrollment event form is in view mode
And the user see the following text: 5
When the user clicks on the edit button
And the user set the apgar score to 11
And the user clicks on the save button
Then you are redirected to the enrollment dashboard
And you open the Birth stage event
Then the user see the following text: Enrollment: View Event
Then the view enrollment event form is in view mode
And the user see the following text: 11

Scenario: User goes directly to Edit mode for scheduled events
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?eventId=RIrfCcEP8Uu&orgUnitId=DiszpKrYNg8
Then the user see the following text: Enrollment: Edit Event
Then the view enrollment event form is in edit mode
And the user see the following text: Infant Feeding
When the user clicks on the cancel button
Then the user see the following text: Enrollment Dashboard
Then the user is navigated to the enrollment dashboard

Scenario: User can update schedule date for a scheduled event
Scenario: User can update schedule date for a scheduled event
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?eventId=RIrfCcEP8Uu&orgUnitId=DiszpKrYNg8
Then the user see the following text: Enrollment: Edit Event
Then the view enrollment event form is in edit mode
And the user see the following text: Infant Feeding
When the user clicks switch tab to Schedule
And the user selects another schedule date
And the user clicks on the schedule button on widget-enrollment-event
Then the user see the following text: Enrollment Dashboard
Then the user is navigated to the enrollment dashboard

Scenario: User can update schedule date if Hide due date is enabled
Given you land on the enrollment event page with selected Focus area by having typed /#/enrollmentEventNew?enrollmentId=V8uPJuhvlL7&orgUnitId=DiszpKrYNg8&programId=M3xtLkYBlKI&stageId=uvMKOn1oWvd&tab=SCHEDULE&teiId=dNpxRu1mWG5
Then the user see the following text: Enrollment: New Event
Then the add event form is displayed
And the user see the following text: Foci response
And the user see the schedule date and info box
And the user clicks on the schedule button on add-event-enrollment-page-content
Then the user see the following text: Enrollment Dashboard
Then the user is navigated to the enrollment dashboard

Scenario: User can see disabled scheduled date for active event
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?eventId=FV4JCI73wO2&orgUnitId=DiszpKrYNg8
Then the user see the following text: Enrollment: View Event
Then the view enrollment event form is in view mode
When the user clicks on the edit button
Then the user see the following text: Enrollment: Edit Event
Then the view enrollment event form is in edit mode
Then the user see the schedule date field with tooltip: Scheduled date cannot be changed for Active events

@user:trackerAutoTestRestricted
Scenario: The user cannot enter edit mode for completed events
Given you land on the enrollment event page with selected Person by having typed /#/enrollmentEventEdit?eventId=nUVwTLuQ6FT&orgUnitId=DiszpKrYNg8
And the user see the following text: Enrollment: View Event
And the view enrollment event form is in view mode
Then the edit button should be disabled

Scenario: User can edit the event and complete the enrollment
Expand All @@ -113,4 +113,4 @@ Scenario: User can edit the event and complete the enrollment
And the user clicks on the edit button
And the user completes the event
And the user completes the enrollment
Then the user sees the enrollment status and recently edited event in Case outcome event status is completed
Then the user sees the enrollment status and recently edited event in Case outcome event status is completed
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then, defineStep as And } from '@badeball/cypress-cucumber-preprocessor';
import { defineStep as And, Given, Then, When } from '@badeball/cypress-cucumber-preprocessor';
import { getCurrentYear } from '../../../support/date';

const changeEnrollmentAndEventsStatus = () => (
Expand Down Expand Up @@ -61,8 +61,7 @@ Given(/^you land on the enrollment event page with selected (.*) by having typed
When(/^the user clicks on the edit button/, () =>
cy
.get('[data-test="widget-enrollment-event"]')
.find('[data-test="dhis2-uicore-button"]')
.eq(1)
.find('[data-test="widget-enrollment-event-edit-button"]')
.click(),
);

Expand All @@ -85,7 +84,7 @@ When(/^the user clicks on the cancel button/, () =>
When(/^the user set the apgar score to (.*)/, score =>
cy
.get('[data-test="widget-enrollment-event"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(2)
.clear()
.type(score)
Expand Down Expand Up @@ -119,8 +118,8 @@ When('the user clicks switch tab to Schedule', () => {

Then('the user selects another schedule date', () => {
cy.get('[data-test="schedule-section"]').within(() => {
cy.get("[data-test='capture-ui-input']").eq(0).should('have.value', `${getCurrentYear() - 15}-01-07`);
cy.get("[data-test='capture-ui-input']").eq(0)
cy.get('input[type="text"]').eq(0).should('have.value', `${getCurrentYear() - 15}-01-07`);
cy.get('input[type="text"]').eq(0)
.clear()
.type(`${getCurrentYear()}-08-01`)
.blur();
Expand Down Expand Up @@ -208,7 +207,18 @@ And('you open the Birth stage event', () => {

Then('the edit button should be disabled', () => {
cy.get('[data-test="widget-enrollment-event"]')
.find('[data-test="dhis2-uicore-button"]')
.eq(1)
.find('[data-test="widget-enrollment-event-edit-button"]')
.should('be.disabled');
});

And('the add event form is displayed', () => {
cy.get('[data-test="add-event-enrollment-page-content"]').should('exist');
});

And('the user is navigated to the enrollment dashboard', () => {
cy.get('[data-test="enrollment-overview-page"]').should('exist');
});

And(/^the view enrollment event form is in (.*) mode$/, (mode) => {
cy.get(`[data-test="widget-enrollment-event-${mode}"]`).should('exist');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Feature: User interacts with Enrollment event page

Scenario: The user can land on the enrollment event page.
Given you land on the enrollment event page by having typed #/enrollmentEventEdit?orgUnitId=DiszpKrYNg8&eventId=O7IACPx40nQ
Then you see the following Enrollment: View Event
Then the view enrollment event form is in view mode
And you see the following Baby Postnatal

Scenario: User can navigate back and forward between the enrollment event edit page and the enrollment page
Scenario: User can navigate back and forward between the enrollment event edit page and the enrollment page
Given you open the enrollment page which has multiple events and stages
Then you see the following Enrollment Dashboard
Then the user is navigated to the enrollment dashboard
And the widgets are done rendering
And the program stages should be displayed
When the user clicks the first second antenatal care visit event
Then you see the following Enrollment: View Event
Then the view enrollment event form is in view mode
And you see the following antenatal care visit
And you see the following No ARV medication plan
When the user clicks the "Back to all stages and events" button
Then you see the following Enrollment Dashboard
And the program stages should be displayed
Then the user is navigated to the enrollment dashboard
And the program stages should be displayed
Loading

0 comments on commit 87f249a

Please sign in to comment.