Skip to content

Commit

Permalink
Merge branch 'master' into DHIS2-16010-app-crash-on-invalid-programid
Browse files Browse the repository at this point in the history
  • Loading branch information
alaa-yahia authored Sep 2, 2024
2 parents 2ea3511 + 325c638 commit 45456b8
Show file tree
Hide file tree
Showing 69 changed files with 1,641 additions and 1,267 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
## [101.3.3](https://github.com/dhis2/capture-app/compare/v101.3.2...v101.3.3) (2024-09-02)


### Bug Fixes

* [DHIS2-17971] trigger program stage specific rules on opening new event page ([#3776](https://github.com/dhis2/capture-app/issues/3776)) ([cd06e41](https://github.com/dhis2/capture-app/commit/cd06e414fc2162397f3844887e1b3f902d18a874))

## [101.3.2](https://github.com/dhis2/capture-app/compare/v101.3.1...v101.3.2) (2024-09-01)


### Bug Fixes

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

## [101.3.1](https://github.com/dhis2/capture-app/compare/v101.3.0...v101.3.1) (2024-08-29)


### Bug Fixes

* [DHIS2-17651] enrollment dashboard UI changes ([#3767](https://github.com/dhis2/capture-app/issues/3767)) ([012b60d](https://github.com/dhis2/capture-app/commit/012b60d3c297eea1bc3bfb62d9329ba37a9c0f94))

# [101.3.0](https://github.com/dhis2/capture-app/compare/v101.2.2...v101.3.0) (2024-08-28)


### Features

* [DHIS2-11836] respect block entry form ([#3759](https://github.com/dhis2/capture-app/issues/3759)) ([ed3ed5a](https://github.com/dhis2/capture-app/commit/ed3ed5a58f602ea487b90bb5997aad9f3b6e22cb))

## [101.2.2](https://github.com/dhis2/capture-app/compare/v101.2.1...v101.2.2) (2024-08-28)


### Bug Fixes

* [DHIS2-17953] Invalid dateFormat conversion in related stages ([#3774](https://github.com/dhis2/capture-app/issues/3774)) ([334297c](https://github.com/dhis2/capture-app/commit/334297c91fca8ef427729a6454f5a8f8dd550453))

## [101.2.1](https://github.com/dhis2/capture-app/compare/v101.2.0...v101.2.1) (2024-08-25)


### Bug Fixes

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

# [101.2.0](https://github.com/dhis2/capture-app/compare/v101.1.3...v101.2.0) (2024-08-22)


### Features

* [DHIS2-17575] disable create new buttons if no data write access ([#3751](https://github.com/dhis2/capture-app/issues/3751)) ([5b3cd1c](https://github.com/dhis2/capture-app/commit/5b3cd1c6150d9b6cc47be274d50bffad05b6da73))

## [101.1.3](https://github.com/dhis2/capture-app/compare/v101.1.2...v101.1.3) (2024-08-18)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const changeEnrollmentAndEventsStatus = () => (
);

const showAllEventsInProgramStage = () => {
cy.get('[data-test="dhis2-uicore-tablefoot"]')
cy.get('[data-test="dhis2-uicore-tabletoolbar"]')
.then(($footer) => {
if ($footer.find('[data-test="show-more-button"]').length > 0) {
$footer.find('[data-test="show-more-button"]')
Expand Down Expand Up @@ -119,11 +119,6 @@ When(/^you click the button to (.*) without post request/, (buttonText) => {

When('the enrollment overview is finished loading', () => {
cy.get('[data-test="dhis2-uicore-circularloader"]').should('not.exist');
cy.get('[data-test="dhis2-uicore-datatable"]')
.within(() => {
cy.get('[data-test="dhis2-uicore-datatablerow"]')
.should('exist');
});
});

When('the form is finished loading', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ Feature: User is able to select program stage when navigating to EnrollmentEvent
Scenario: The stage-button should be disabled when non-repeatable & event > 0
Given you land on the EnrollmentEventNew-page without a stageId
Then the stage-button should be disabled

@user:trackerAutoTestRestricted
Scenario: The stage-button should be disabled when no data write access
Given you open the enrollment page by typing #enrollmentEventNew?enrollmentId=WKPoiZxZxNG&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=PgmUFEQYZdt
Then the stage-button should be disabled
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';

Given(/^you open the enrollment page by typing (.*)$/, url =>
cy.visit(url),
);

Given('you land on the EnrollmentEventNew-page without a stageId', () => {
cy.visit('/#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8&teiId=x2kJgpb0XQC&enrollmentId=RiNIt1yJoge');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ Scenario: User can see disabled scheduled date for active event
Then the user see the following text: Enrollment: Edit Event
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
Then the edit button should be disabled

Scenario: User can edit the event and complete the enrollment
Given you land on the enrollment event page with selected Malaria Entity by having typed #/enrollmentEventEdit?eventId=MHR4Zj6KLz0&orgUnitId=DiszpKrYNg8
And the enrollment status is active
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,9 @@ 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)
.should('be.disabled');
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ Feature: User interacts with the quick actions-menu
When you click the schedule event-button
Then you should be navigated to the schedule tab

@user:trackerAutoTestRestricted
Scenario: The create new quick actions button should be disabled if no available stages
Given you open the enrollment page by typing #enrollment?enrollmentId=WKPoiZxZxNG&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=PgmUFEQYZdt
Then the quick action buttons should be disabled

Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';

Given(/^you open the enrollment page by typing (.*)$/, url =>
cy.visit(url),
);

Given('you are on an enrollment page with stage available', () => {
cy.visit('/#/enrollment?programId=ur1Edk5Oe2n&orgUnitId=UgYg0YW7ZIh&teiId=zmgVvEZ91Kg&enrollmentId=xRnBV5aJDeF');
cy.get('[data-test="enrollment-page-content"]')
Expand Down Expand Up @@ -31,3 +35,9 @@ Then('the buttons should be disabled', () => {
.should('be.disabled');
});
});

Then('the quick action buttons should be disabled', () => {
cy.get('[data-test="quick-action-button-container"]')
.find('button')
.should('be.disabled');
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Feature: User interacts with Stages and Events Widget

@user:trackerAutoTestRestricted
Scenario: Create new event button is disabled if no data write access
Given you open the enrollment page by typing #enrollment?enrollmentId=WKPoiZxZxNG&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=PgmUFEQYZdt
Then you should see the disabled button New Previous deliveries event

Scenario: User can view program stages
Given you open the enrollment page
Then the program stages should be displayed
Expand All @@ -24,13 +29,10 @@ Feature: User interacts with Stages and Events Widget
And you see the first 5 events in the table
And you see buttons in the footer list

Scenario: User can view more events and then view less
Scenario: User can view more events
Given you open the enrollment page which has multiples events and stages
When you click show more button in stages&event list
Then more events should be displayed
And reset button should be displayed
And you click reset button
Then there should be 5 rows in the table
Then there should be 10 rows in the table

Scenario: User can sort the list of events
Given you open the enrollment page which has multiples events and stages
Expand Down Expand Up @@ -64,3 +66,4 @@ Feature: User interacts with Stages and Events Widget
Scenario: Program stage is hidden if no data read access
And you open the enrollment page by typing #enrollment?enrollmentId=iNEq9d22Nyp&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=k4ODejBytgv
Then the Care at birth program stage should be hidden

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ When('you click show more button in stages&event list', () => {
});
});

Then('more events should be displayed', () => {
Then('there should be 10 rows in the table', () => {
cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.find('[data-test="stage-content"]')
Expand All @@ -61,34 +61,6 @@ Then('more events should be displayed', () => {
});
});

Then('reset button should be displayed', () => {
cy.get('[data-test="stages-and-events-widget"]').within(() => {
cy.get('[data-test="view-all-button"]').should('exist');
cy.get('[data-test="show-more-button"]').should('exist');
cy.get('[data-test="reset-button"]').should('exist');
cy.get('[data-test="create-new-button"]').should('exist');
});
});

And('you click reset button', () => {
cy.get('[data-test="stages-and-events-widget"]').within(() => {
cy.get('[data-test="reset-button"]').click();
cy.wait(100);
});
});

Then('there should be 5 rows in the table', () => {
cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.find('[data-test="stage-content"]')
.eq(2)
.within(() => {
cy.get('[data-test="dhis2-uicore-datatable"]').should('exist');
cy.get('[data-test="dhis2-uicore-tablebody"]')
.find('[data-test="dhis2-uicore-datatablerow"]').should('have.length', 5);
});
});

Then('the default list should be displayed', () => {
const rows = [
'07-13|Bumbeh MCHP',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 7 additions & 16 deletions i18n/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n"
"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n"
"PO-Revision-Date: 2019-06-27 07:31+0000\n"
"Last-Translator: Viktor Varland <[email protected]>, 2024\n"
"Language-Team: Arabic (https://app.transifex.com/hisp-uio/teams/100509/ar/)\n"
Expand Down Expand Up @@ -494,18 +494,6 @@ msgstr "يحتوي على نص"
msgid "Yes"
msgstr "نعم"

msgid "mm/dd/yyyy"
msgstr "mm/dd/yyyy"

msgid "Years"
msgstr "السنوات"

msgid "Months"
msgstr "الأشهر"

msgid "Days"
msgstr "‏‏الأيام"

msgid "Uploading file"
msgstr "تحميل ملف"

Expand Down Expand Up @@ -1487,6 +1475,12 @@ msgstr "تاريخ التقرير"
msgid "Please select a valid event"
msgstr ""

msgid "You do not have access to create events in this stage"
msgstr ""

msgid "This stage can only have one event"
msgstr ""

msgid "New {{ eventName }} event"
msgstr ""

Expand All @@ -1502,9 +1496,6 @@ msgstr ""
msgid "Go to full {{ eventName }}"
msgstr ""

msgid "This stage can only have one event"
msgstr ""

msgid "Events could not be retrieved. Please try again later."
msgstr ""

Expand Down
29 changes: 10 additions & 19 deletions i18n/ar_IQ.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n"
"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n"
"PO-Revision-Date: 2019-06-27 07:31+0000\n"
"Last-Translator: KRG HIS <[email protected]>, 2024\n"
"Language-Team: Arabic (Iraq) (https://app.transifex.com/hisp-uio/teams/100509/ar_IQ/)\n"
Expand Down Expand Up @@ -491,18 +491,6 @@ msgstr "يحتوي على نص"
msgid "Yes"
msgstr "نعم"

msgid "mm/dd/yyyy"
msgstr "شهر / يوم / سنة"

msgid "Years"
msgstr "السنوات"

msgid "Months"
msgstr "الأشهر"

msgid "Days"
msgstr "‏‏الأيام"

msgid "Uploading file"
msgstr "تحميل ملف"

Expand Down Expand Up @@ -1323,6 +1311,9 @@ msgstr ""
msgid "Event completed"
msgstr ""

msgid "The event cannot be edited after it has been completed"
msgstr ""

msgid "Back to all stages and events"
msgstr ""

Expand Down Expand Up @@ -1482,22 +1473,22 @@ msgstr ""
msgid "Please select a valid event"
msgstr ""

msgid "New {{ eventName }} event"
msgid "You do not have access to create events in this stage"
msgstr ""

msgid "To open this event, please wait until saving is complete"
msgid "This stage can only have one event"
msgstr ""

msgid "Show {{ rest }} more"
msgid "New {{ eventName }} event"
msgstr ""

msgid "Reset list"
msgid "To open this event, please wait until saving is complete"
msgstr ""

msgid "Go to full {{ eventName }}"
msgid "Show {{ rest }} more"
msgstr ""

msgid "This stage can only have one event"
msgid "Go to full {{ eventName }}"
msgstr ""

msgid "Events could not be retrieved. Please try again later."
Expand Down
Loading

0 comments on commit 45456b8

Please sign in to comment.