Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into hv/feat/DHIS2-17652…
Browse files Browse the repository at this point in the history
…_ReplaceMaterialUIAvatar
  • Loading branch information
henrikmv committed Jul 28, 2024
2 parents 0d6dc31 + 47546b0 commit 399a7e6
Show file tree
Hide file tree
Showing 42 changed files with 1,936 additions and 1,226 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## [100.70.15](https://github.com/dhis2/capture-app/compare/v100.70.14...v100.70.15) (2024-07-28)


### Bug Fixes

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

## [100.70.14](https://github.com/dhis2/capture-app/compare/v100.70.13...v100.70.14) (2024-07-24)


### Bug Fixes

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

## [100.70.13](https://github.com/dhis2/capture-app/compare/v100.70.12...v100.70.13) (2024-07-23)


### Bug Fixes

* [DHIS2-15687] display translated options in profile widget ([#3717](https://github.com/dhis2/capture-app/issues/3717)) ([54e5582](https://github.com/dhis2/capture-app/commit/54e5582bfcf3dbaf67c1e18ac2cf48953fedb22c))

## [100.70.12](https://github.com/dhis2/capture-app/compare/v100.70.11...v100.70.12) (2024-07-18)


### Bug Fixes

* [DHIS2-17653] Exclude Linked Events from Dropdown List in Actions Widget ([#3697](https://github.com/dhis2/capture-app/issues/3697)) ([305623e](https://github.com/dhis2/capture-app/commit/305623ef19b512b0ffc9f97d5824129b3b4484c0))

## [100.70.11](https://github.com/dhis2/capture-app/compare/v100.70.10...v100.70.11) (2024-07-15)


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

# DHIS2-17657
@skip
Scenario: User can complete a Lab monitoring Event
Given you land on the enrollment new event page by having typed /#/enrollment?programId=ur1Edk5Oe2n&orgUnitId=DiszpKrYNg8&teiId=yGIeBkYzW2o&enrollmentId=Pm0VlgHBgRm
And the enrollment overview is finished loading
Expand All @@ -12,9 +10,8 @@ Feature: User interacts with the Enrollment New Event Workspace
And you click the Complete button
Then all events should be displayed
And the newest event in datatable nr 0 should contain Completed
And the events in Lab monitoring are deleted

# DHIS2-17657
@skip
Scenario: User can save a Sputum smear microscopy test without completing
Given you land on the enrollment new event page by having typed /#/enrollment?programId=ur1Edk5Oe2n&orgUnitId=DiszpKrYNg8&teiId=yGIeBkYzW2o&enrollmentId=Pm0VlgHBgRm
And the enrollment overview is finished loading
Expand All @@ -24,9 +21,10 @@ Feature: User interacts with the Enrollment New Event Workspace
And the user selects Positive
And you click the Save without completing button
Then all events should be displayed
And the newest event in datatable nr 2 should contain Active
And the newest event in datatable nr 2 should contain 13
And the newest event in datatable nr 2 should contain Positive
And the newest event in datatable nr 1 should contain Active
And the newest event in datatable nr 1 should contain 13
And the newest event in datatable nr 1 should contain Positive
And the events in Sputum smear microscopy are deleted

Scenario: Required fields should display an error when saving without data
Given you land on the enrollment new event page by having typed /#/enrollment?programId=ur1Edk5Oe2n&orgUnitId=DiszpKrYNg8&teiId=yGIeBkYzW2o&enrollmentId=Pm0VlgHBgRm
Expand Down Expand Up @@ -87,6 +85,6 @@ Feature: User interacts with the Enrollment New Event Workspace
And the enrollment status is active
And you type 2021-10-15 in the input number 0
And you select Died in the select number 0
And the user completes the event
And you click the Complete button
And the user completes the enrollment
Then the user sees the enrollment status and recently added event in Case outcome event status is completed
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,18 @@ And('the enrollment status is active', () => {
changeEnrollmentAndEventsStatus();
});

And('the user completes the event', () => {
And('you click the Complete button', () => {
cy.get('[data-test="dhis2-uicore-button"]')
.contains('Complete')
.click();
});

And('you click the Save without completing button', () => {
cy.get('[data-test="dhis2-uicore-button"]')
.contains('Save without completing')
.click();
});

When('the user completes the enrollment', () => {
cy.get('[data-test="enrollment-complete-modal"]').within(() => {
cy.contains('Case outcome completed').should('exist');
Expand Down Expand Up @@ -230,3 +236,23 @@ Then('the user sees the enrollment status and recently added event in Case outco
});
changeEnrollmentAndEventsStatus();
});

And(/^the events in (.*) are deleted$/, (name) => {
const programStages = [
{ name: 'Lab monitoring', id: 'EPEcjy3FWmI' },
{ name: 'Sputum smear microscopy', id: 'jdRD35YwbRH' },
];
const programStage = programStages.find(e => e.name === name);

cy.buildApiUrl('tracker', 'enrollments/Pm0VlgHBgRm?fields=events[programStage,event]')
.then(url => cy.request(url))
.then(({ body }) => {
const eventsToDelete = body.events.filter(e => e.programStage === programStage.id);

if (eventsToDelete) {
cy.buildApiUrl('tracker?async=false&importStrategy=DELETE').then((eventUrl) => {
cy.request('POST', eventUrl, { events: eventsToDelete });
});
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ Then the user see the following text: Low-dose acetylsalicylic acid given
When the user sets Plurality assessed to Singleton
Then the user don't see the following text: Low-dose acetylsalicylic acid given

# DHIS2-17730
@skip
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
And the user see the following text: 11
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,29 @@ const changeEnrollmentAndEventsStatus = () => (
})
);

And('the apgar score is 11', () => {
cy.buildApiUrl('tracker', 'events/V1CerIi3sdL')
.then(url => cy.request(url))
.then(({ body }) => {
const { dataValues, ...rest } = body;
const dataValuesToUpdate = dataValues.map(dataValue => (
dataValue.dataElement === 'a3kGcGDCuk6' ? { ...dataValue, value: 11 } : dataValue
));
const eventToUpdate = { ...rest, dataValues: dataValuesToUpdate };

return cy
.buildApiUrl('tracker?async=false&importStrategy=UPDATE')
.then(url => cy.request('POST', url, { events: [eventToUpdate] }))
.then(() => {
cy.reload();
cy.get('[data-test="widget-enrollment-event"]')
.find('[data-test="form-field"]')
.contains('11')
.should('exist');
});
});
});

Given(/^you land on the enrollment event page with selected (.*) by having typed (.*)$/, (tet, url) => {
cy.visit(url);
cy.get('[data-test="scope-selector"]').contains(`${tet}`);
Expand Down
3 changes: 3 additions & 0 deletions cypress/e2e/NewPage/NewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ Then('you submit the form again from the duplicates modal', () => {
// New person in WHO RMNCH Tracker
And('you are in the WHO RMNCH program registration page', () => {
cy.visit('/#/new?programId=WSGAb5XwJ3Y&orgUnitId=DiszpKrYNg8');
cy.get('[data-test="capture-ui-input"]')
.eq(1)
.invoke('val').should('not.be.empty');
});

And('you are in Child programme registration page', () => {
Expand Down
81 changes: 46 additions & 35 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-04-12T20:48:54.429Z\n"
"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n"
"PO-Revision-Date: 2019-06-27 07:31+0000\n"
"Last-Translator: Viktor Varland <viktor@dhis2.org>, 2024\n"
"Language-Team: Arabic (https://app.transifex.com/hisp-uio/teams/100509/ar/)\n"
Expand Down Expand Up @@ -198,15 +198,15 @@ msgstr "المستخدم المعين"
msgid "Search for user"
msgstr "البحث عن مستخدم"

msgid "Notes"
msgstr ""

msgid "Basic info"
msgstr "المعلومات الأساسية"

msgid "Status"
msgstr "الحالة"

msgid "Comments"
msgstr "التعليقات"

msgid "Relationships"
msgstr "علاقات"

Expand Down Expand Up @@ -238,8 +238,8 @@ msgstr "النشطة"
msgid "Completed"
msgstr "مكتمل"

msgid "Please add or cancel comment before saving the event"
msgstr "يرجى إضافة أو إلغاء التعليق قبل حفظ الحدث"
msgid "Please add or cancel note before saving the event"
msgstr ""

msgid "Save and add another"
msgstr "حفظ واضافة جديد"
Expand Down Expand Up @@ -626,14 +626,14 @@ msgstr "غير متصل"
msgid "Syncing"
msgstr "تزامن"

msgid "Add comment"
msgstr "اضافة تعليق"
msgid "Add note"
msgstr "أضف ملاحظة"

msgid "You don't have access to write comments"
msgid "You don't have access to write notes"
msgstr ""

msgid "Write comment"
msgstr "اكتب تعليقاً"
msgid "Write note"
msgstr ""

msgid "was blanked out and hidden by your last action"
msgstr ""
Expand Down Expand Up @@ -830,17 +830,19 @@ msgstr ""
msgid "Please select an organisation unit."
msgstr ""

msgid "New"
msgstr "جديد"
msgid ""
"You don't have access to create a {{trackedEntityName}} in the current "
"selections"
msgstr ""

msgid "Choose the {{missingCategories}} to start reporting"
msgstr ""

msgid "Save as new"
msgstr ""

msgid "View enrollment"
msgstr ""
msgid "New"
msgstr "جديد"

msgid "Create for"
msgstr ""
Expand Down Expand Up @@ -1148,9 +1150,6 @@ msgid ""
"program. All activity will be logged."
msgstr ""

msgid "Save comment"
msgstr "حفظ التعليق"

msgid "Enrollment actions"
msgstr ""

Expand Down Expand Up @@ -1270,22 +1269,25 @@ msgstr ""
msgid "Add area"
msgstr ""

msgid "Comments about this enrollment"
msgid "Please add or cancel the note before saving the event"
msgstr ""

msgid "Write a comment about this enrollment"
msgid "organisation unit could not be retrieved. Please try again later."
msgstr ""

msgid "This enrollment doesn't have any comments"
msgid "Saving to {{stageName}} for {{programName}} in {{orgUnitName}}"
msgstr ""

msgid "organisation unit could not be retrieved. Please try again later."
msgid "program or stage is invalid"
msgstr ""

msgid "Saving to {{stageName}} for {{programName}} in {{orgUnitName}}"
msgid "Notes about this enrollment"
msgstr ""

msgid "program or stage is invalid"
msgid "Write a note about this enrollment"
msgstr ""

msgid "This enrollment doesn't have any notes"
msgstr ""

msgid "Error"
Expand All @@ -1294,15 +1296,6 @@ msgstr "خطأ"
msgid "Warning"
msgstr "تحذير"

msgid "Comments about this event"
msgstr ""

msgid "Write a comment about this event"
msgstr ""

msgid "This event doesn't have any comments"
msgstr ""

msgid "stage not found in rules execution"
msgstr ""

Expand All @@ -1324,6 +1317,15 @@ msgstr "الحدث مكتمل"
msgid "Back to all stages and events"
msgstr ""

msgid "Notes about this event"
msgstr ""

msgid "Write a note about this event"
msgstr ""

msgid "This event doesn't have any notes"
msgstr ""

msgid "Schedule date info"
msgstr ""

Expand Down Expand Up @@ -1370,12 +1372,15 @@ msgstr ""
msgid "Schedule date / Due date"
msgstr ""

msgid "Event comments"
msgid "Event notes"
msgstr ""

msgid "Write a comment about this scheduled event"
msgid "Write a note about this scheduled event"
msgstr ""

msgid "Save note"
msgstr "حفظ ملاحظة"

msgid ""
"Change information about this {{trackedEntityName}} here. To change "
"information about this enrollment, use the Edit button in the in the "
Expand Down Expand Up @@ -1439,6 +1444,12 @@ msgstr ""
msgid "Choose a {{linkableStageLabel}}"
msgstr ""

msgid "{{ linkableStageLabel }} is not repeatable"
msgstr ""

msgid "{{ linkableStageLabel }} has no linkable events"
msgstr ""

msgid "Ambiguous relationships, contact system administrator"
msgstr ""

Expand Down
Loading

0 comments on commit 399a7e6

Please sign in to comment.