-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into DHIS2-15480
- Loading branch information
Showing
76 changed files
with
3,083 additions
and
908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
cypress/integration/EnrollmentPage/HiddenProgramStage.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Feature: Hidden program stage | ||
|
||
Scenario: The user cannot add an event in a hidden program stage | ||
Given you add an enrollment event that will result in a rule effect to hide a program stage | ||
Then the New Postpartum care visit event button is disabled in the stages and events widget | ||
And and an error is show in the Postpartum care visit stage | ||
And the Postpartum care visit button is disabled in the enrollmentEventNew page |
66 changes: 66 additions & 0 deletions
66
cypress/integration/EnrollmentPage/HiddenProgramStage/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import moment from 'moment'; | ||
|
||
const cleanUpIfApplicable = () => { | ||
cy.buildApiUrl( | ||
'tracker', | ||
'trackedEntities/uW8Y7AIcRKA?program=WSGAb5XwJ3Y&fields=enrollments', | ||
) | ||
.then(url => cy.request(url)) | ||
.then(({ body }) => { | ||
const enrollment = body.enrollments?.find(e => e.enrollment === 'fmhIsWXVDmS'); | ||
const event = enrollment?.events?.find(e => e.programStage === 'PFDfvmGpsR3'); | ||
if (!event) { | ||
return null; | ||
} | ||
return cy | ||
.buildApiUrl('events', event.event) | ||
.then(eventUrl => | ||
cy.request('DELETE', eventUrl)); | ||
}); | ||
}; | ||
|
||
Given('you add an enrollment event that will result in a rule effect to hide a program stage', () => { | ||
cleanUpIfApplicable(); | ||
cy.visit( | ||
'/#/enrollmentEventNew?enrollmentId=fmhIsWXVDmS&orgUnitId=s7SLtx8wmRA&programId=WSGAb5XwJ3Y&stageId=PFDfvmGpsR3&teiId=uW8Y7AIcRKA', | ||
); | ||
|
||
cy.get('[data-test="capture-ui-input"]') | ||
.eq(0) | ||
.type(moment().format('YYYY-MM-DD')) | ||
.blur(); | ||
|
||
cy | ||
.get('[data-test="virtualized-select"]') | ||
.eq(6) | ||
.click() | ||
.contains('Termination of pregnancy') | ||
.click(); | ||
|
||
cy.contains('[data-test="dhis2-uicore-button"]', 'Save without completing').click(); | ||
}); | ||
|
||
Then('the New Postpartum care visit event button is disabled in the stages and events widget', () => { | ||
cy.contains('[data-test="create-new-button"]', 'New Postpartum care visit event') | ||
.should('be.disabled'); | ||
}); | ||
|
||
Then('and an error is show in the Postpartum care visit stage', () => { | ||
cy.visit( | ||
'/#/enrollmentEventNew?enrollmentId=fmhIsWXVDmS&orgUnitId=s7SLtx8wmRA&programId=WSGAb5XwJ3Y&teiId=uW8Y7AIcRKA&stageId=bbKtnxRZKEP', | ||
); | ||
cy.contains('[data-test="dhis2-uicore-button"]', 'Complete') | ||
.should('be.disabled'); | ||
cy.contains('[data-test="dhis2-uicore-button"]', 'Save without completing') | ||
.should('be.disabled'); | ||
cy.contains('[data-test="dhis2-uicore-noticebox-content"]', 'You can\'t add any more Postpartum care visit events') | ||
.should('exist'); | ||
}); | ||
|
||
Then('the Postpartum care visit button is disabled in the enrollmentEventNew page', () => { | ||
cy.visit( | ||
'/#/enrollmentEventNew?enrollmentId=fmhIsWXVDmS&orgUnitId=s7SLtx8wmRA&programId=WSGAb5XwJ3Y&teiId=uW8Y7AIcRKA', | ||
); | ||
|
||
cy.contains('[data-test="program-stage-selector-button"]', 'Postpartum care visit').should('be.disabled'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# | ||
# Translators: | ||
# KRG HIS <[email protected]>, 2020 | ||
# phil_dhis2, 2022 | ||
# Philip Larsen Donnelly, 2022 | ||
# Viktor Varland <[email protected]>, 2023 | ||
# Hamza Assada <[email protected]>, 2023 | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: i18next-conv\n" | ||
"POT-Creation-Date: 2023-06-27T06:20:33.460Z\n" | ||
"POT-Creation-Date: 2023-09-04T07:07:59.195Z\n" | ||
"PO-Revision-Date: 2019-06-27 07:31+0000\n" | ||
"Last-Translator: Hamza Assada <[email protected]>, 2023\n" | ||
"Language-Team: Arabic (https://app.transifex.com/hisp-uio/teams/100509/ar/)\n" | ||
|
@@ -75,6 +75,16 @@ msgstr "تاريخ التسجيل" | |
msgid "Last updated" | ||
msgstr "آخر تحديث" | ||
|
||
msgid "error encountered during field validation" | ||
msgstr "حدث خطأ أثناء التحقق من صحة الحقل" | ||
|
||
msgid "error" | ||
msgstr "خطأ" | ||
|
||
msgid "" | ||
"Plugins are not yet available - Please contact your system administrator" | ||
msgstr "" | ||
|
||
msgid "This value is validating" | ||
msgstr "يتم التحقق من القيمة" | ||
|
||
|
@@ -368,9 +378,6 @@ msgstr "لا تزال بعض العمليات قيد التشغيل. يرجى ا | |
msgid "Operations running" | ||
msgstr "العمليات الجارية" | ||
|
||
msgid "Sort" | ||
msgstr "فرز" | ||
|
||
msgid "" | ||
"This event has unsaved changes. Leaving this page without saving will lose " | ||
"these changes. Are you sure you want to discard unsaved changes?" | ||
|
@@ -755,7 +762,7 @@ msgstr "المجدولة زمنياً" | |
msgid "Refer" | ||
msgstr "" | ||
|
||
msgid "You can’t add any more {{ programStageName }} events" | ||
msgid "You can't add any more {{ programStageName }} events" | ||
msgstr "" | ||
|
||
msgid "Cancel without saving" | ||
|
@@ -819,6 +826,9 @@ msgstr "" | |
msgid "New Enrollment in program{{escape}} {{programName}}" | ||
msgstr "" | ||
|
||
msgid "Save {{trackedEntityTypeName}}" | ||
msgstr "" | ||
|
||
msgid "Save {{trackedEntityName}}" | ||
msgstr "" | ||
|
||
|
@@ -972,15 +982,6 @@ msgstr "يمكنك أيضًا اختيار برنامج من الشريط الع | |
msgid "Choose a type to start searching" | ||
msgstr "اختر نوعًا لبدء البحث" | ||
|
||
msgid "Fill in at least {{count}} attribute to search" | ||
msgid_plural "Fill in at least {{count}} attribute to search" | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
msgstr[2] "" | ||
msgstr[3] "" | ||
msgstr[4] "" | ||
msgstr[5] "" | ||
|
||
msgid "Search {{name}}" | ||
msgstr "البحث عن {{name}}" | ||
|
||
|
@@ -1135,6 +1136,9 @@ msgstr "" | |
msgid "Mark for follow-up" | ||
msgstr "اشر من أجل الملحق" | ||
|
||
msgid "Existing dates for auto-generated events will not be updated." | ||
msgstr "" | ||
|
||
msgid "Enrollment date" | ||
msgstr "تاريخ التسجيل" | ||
|
||
|
@@ -1223,32 +1227,12 @@ msgid "" | |
"The scheduled date matches the suggested date, but can be changed if needed." | ||
msgstr "" | ||
|
||
msgid "The scheduled date is {{count}} days {{position}} the suggested date." | ||
msgid_plural "" | ||
"The scheduled date is {{count}} days {{position}} the suggested date." | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
msgstr[2] "" | ||
msgstr[3] "" | ||
msgstr[4] "" | ||
msgstr[5] "" | ||
|
||
msgid "after" | ||
msgstr "بعد" | ||
|
||
msgid "before" | ||
msgstr "قبل" | ||
|
||
msgid "There are {{count}} scheduled event in {{orgUnitName}} on this day." | ||
msgid_plural "" | ||
"There are {{count}} scheduled event in {{orgUnitName}} on this day." | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
msgstr[2] "" | ||
msgstr[3] "" | ||
msgstr[4] "" | ||
msgstr[5] "" | ||
|
||
msgid "" | ||
"Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}" | ||
msgstr "" | ||
|
@@ -1496,9 +1480,6 @@ msgstr "" | |
msgid "Set coordinate" | ||
msgstr "ضبط الإحداثية" | ||
|
||
msgid "Page {{currentPage}}" | ||
msgstr "صفحة {{currentPage}}" | ||
|
||
msgid "Date" | ||
msgstr "التاريخ" | ||
|
||
|
@@ -1517,11 +1498,8 @@ msgstr "حتى تاريخ" | |
msgid "To time" | ||
msgstr "إلى وقت" | ||
|
||
msgid "error encountered during field validation" | ||
msgstr "حدث خطأ أثناء التحقق من صحة الحقل" | ||
|
||
msgid "error" | ||
msgstr "خطأ" | ||
msgid "Page {{currentPage}}" | ||
msgstr "صفحة {{currentPage}}" | ||
|
||
msgid "Delete polygon" | ||
msgstr "حذف المضلع" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.