Skip to content

Commit

Permalink
Merge branch 'master' into DHIS2-17854
Browse files Browse the repository at this point in the history
  • Loading branch information
simonadomnisoru committed Oct 3, 2024
2 parents e855660 + b8245ea commit 067bb56
Show file tree
Hide file tree
Showing 83 changed files with 1,838 additions and 876 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/rebuild-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'dhis2: rebuild developer docs'

on:
push:
branches:
- master
paths:
- 'docs/developer/**'
- 'CHANGELOG.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
rebuild-docs:
runs-on: ubuntu-latest
steps:
- run: curl -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_DEVELOPER_DOCS_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
- name: Build
run: yarn build

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: app-build
path: |
Expand All @@ -214,7 +214,7 @@ jobs:
with:
node-version: 18.x

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: app-build

Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
## [101.6.2](https://github.com/dhis2/capture-app/compare/v101.6.1...v101.6.2) (2024-10-01)


### Bug Fixes

* [DHIS2-18004] sort events in rules engine by occurredAt and createdAt ([#3788](https://github.com/dhis2/capture-app/issues/3788)) ([2bb485e](https://github.com/dhis2/capture-app/commit/2bb485e0927e9137874131a982fe690b9f6c5361))

## [101.6.1](https://github.com/dhis2/capture-app/compare/v101.6.0...v101.6.1) (2024-09-29)


### Bug Fixes

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

# [101.6.0](https://github.com/dhis2/capture-app/compare/v101.5.0...v101.6.0) (2024-09-27)


### Features

* support custom background color ([#3814](https://github.com/dhis2/capture-app/issues/3814)) ([22cfe58](https://github.com/dhis2/capture-app/commit/22cfe585b6b044c7d6b146c1449ccddb85d8abb4))

# [101.5.0](https://github.com/dhis2/capture-app/compare/v101.4.1...v101.5.0) (2024-09-24)


### Features

* [DHIS2-17770] Org unit contextualization in self contained widgets ([#3720](https://github.com/dhis2/capture-app/issues/3720)) ([562b03a](https://github.com/dhis2/capture-app/commit/562b03a1cf2cb5cff5382bd433943f289c860095))

## [101.4.1](https://github.com/dhis2/capture-app/compare/v101.4.0...v101.4.1) (2024-09-19)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([#3805](https://github.com/dhis2/capture-app/issues/3805)) ([a4464f4](https://github.com/dhis2/capture-app/commit/a4464f431618200853772cc2546ea9adff515840))

# [101.4.0](https://github.com/dhis2/capture-app/compare/v101.3.3...v101.4.0) (2024-09-09)


### Features

* [DHIS2-17878][DHIS2-17048] Add overflow menu with actions to stages&events ([#3756](https://github.com/dhis2/capture-app/issues/3756)) ([12af138](https://github.com/dhis2/capture-app/commit/12af1384f4ab4e9c6eeef2460bee7d53bfb6b8cc))

## [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)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
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
Expand Down Expand Up @@ -57,13 +53,36 @@ Feature: User interacts with Stages and Events Widget
When you click New First antenatal care visit event
Then you should navigate to Add new page #/enrollmentEventNew?enrollmentId=ek4WWAgXX5i&orgUnitId=DwpbWkiqjMy&programId=WSGAb5XwJ3Y&stageId=WZbXY0S00lP&teiId=yFcOhsM1Yoa


Scenario: User can not go to Add new page if stage is not repeatable and there is event in the stage
Given you open the enrollment page by typing #enrollment?programId=IpHINAT79UW&orgUnitId=UgYg0YW7ZIh&teiId=fhFQhO0xILJ&enrollmentId=gPDueU02tn8
Then you should see the disabled button New Birth event

Scenario: User can skip a scheduled event
Given you open the enrollment page by typing #/enrollment?enrollmentId=gL8BooqKhdX&orgUnitId=DiszpKrYNg8&programId=ur1Edk5Oe2n&teiId=RABlFsj5Omi
And there is an Overdue event in the TB visit stage
When you click the Skip event overflow button on the Overdue event
Then the event should be skipped

Scenario: User can unskip a scheduled event
Given you open the enrollment page by typing #/enrollment?enrollmentId=gL8BooqKhdX&orgUnitId=DiszpKrYNg8&programId=ur1Edk5Oe2n&teiId=RABlFsj5Omi
And there is an Skipped event in the TB visit stage
When you click the Unskip event overflow button on the Skipped event
Then there is an Overdue event in the TB visit stage

@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
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
Then the TB visit stage should be empty

@user:trackerAutoTestRestricted
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

@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
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
import { Given, When, Then, defineStep as And } from '@badeball/cypress-cucumber-preprocessor';
import { Given, When, Then, defineStep as And, After } from '@badeball/cypress-cucumber-preprocessor';
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.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.contains('[data-test="stage-content"]', 'TB visit')
.find('[data-test="create-new-button"]')
.click();

cy.get('[data-test="capture-ui-input"]')
.first()
.type('2023-01-26')
.blur();

cy.get('[data-test="virtualized-select"]')
.eq(0)
.click()
.contains('P+')
.click();

cy.get('[data-test="virtualized-select"]')
.eq(1)
.click()
.contains('New')
.click();

cy.get('[data-test="dhis2-uicore-button"]')
.contains('Save without completing')
.click();
});

Then('the program stages should be displayed', () => {
cy.get('[data-test="stages-and-events-widget"]')
.within(() => {
Expand Down Expand Up @@ -162,3 +193,58 @@ Then('the Care at birth program stage should be hidden', () => {
cy.contains('[data-test="stages-and-events-widget"]', 'Postpartum care visit').should('exist');
cy.contains('[data-test="stages-and-events-widget"]', 'Care at birth').should('not.exist');
});

Given(/there is an (.*) event in the TB visit stage$/, (eventStatus) => {
cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.contains('[data-test="stage-content"]', 'TB visit')
.within(() => {
cy.get('[data-test="dhis2-uicore-datatablerow"]')
.contains(eventStatus);
});
});

When(/you click the (.*) event overflow button on the (.*) event$/, (buttonName, eventStatus) => {
cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.contains('[data-test="stage-content"]', 'TB visit')
.find('[data-test="dhis2-uicore-tablebody"]')
.contains('tr', eventStatus)
.find('[data-test="overflow-button"]')
.click({ force: true });

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

Then('the event should be skipped', () => {
cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.contains('[data-test="stage-content"]', 'TB visit')
.find('[data-test="dhis2-uicore-datatablerow"]')
.contains('Skipped');
});

Then('the TB visit stage should be empty', () => {
cy.get('[data-test="stages-and-events-widget"]')
.find('[data-test="widget-contents"]')
.contains('[data-test="stage-content"]', 'TB visit')
.find('[data-test="dhis2-uicore-datatablerow"]')
.should('not.exist');
});

When('you confirm you want to delete the event', () => {
cy.intercept('POST', '**/tracker?async=false&importStrategy=DELETE')
.as('deleteEvent');

cy.get('[data-test="dhis2-uicore-modal"]').within(() => {
cy.contains('button', 'Yes, delete event')
.click();
});

cy.wait('@deleteEvent')
.its('response.statusCode')
.should('eq', 200);
});

Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Then('the user sees the enrollment organisation unit', () => {
cy.get('[data-test="widget-enrollment"]').within(() => {
cy.get('[data-test="widget-enrollment-icon-orgunit"]').should('exist');
cy.get('[data-test="widget-enrollment-orgunit"]')
.contains('Started at Ngelehun CHC')
.contains('Started at: Ngelehun CHC')
.should('exist');
});
});
Expand All @@ -77,7 +77,7 @@ Then('the user sees the owner organisation unit', () => {
'exist',
);
cy.get('[data-test="widget-enrollment-owner-orgunit"]')
.contains('Owned by Ngelehun CHC')
.contains('Owned by: Ngelehun CHC')
.should('exist');
});
});
Expand Down Expand Up @@ -232,7 +232,7 @@ 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 Njandama MCHP')
.contains('Owned by: Njandama MCHP')
.should('exist');
});
});
Expand All @@ -246,7 +246,7 @@ Then(/^the user types in (.*)/, (orgunit) => {
Given(/^the enrollment owner organisation unit is (.*)/, (orgunit) => {
cy.get('[data-test="widget-enrollment"]').within(() => {
cy.get('[data-test="widget-enrollment-owner-orgunit"]')
.contains(`Owned by ${orgunit}`)
.contains(`Owned by: ${orgunit}`)
.should('exist');
});
});
Expand Down
8 changes: 4 additions & 4 deletions docs/developer/enrollment-plugins/manual-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ You can also have different layouts for the three different enrollment pages.
},
{
"type": "component",
"name": "EnrollmentComment"
"name": "EnrollmentNote"
},
{
"type": "component",
Expand Down Expand Up @@ -188,7 +188,7 @@ You can also have different layouts for the three different enrollment pages.
},
{
"type": "component",
"name": "EventComment"
"name": "EventNote"
},
{
"type": "component",
Expand Down Expand Up @@ -229,8 +229,8 @@ type DefaultComponents = 'QuickActions'
| 'AssigneeWidget'
| 'NewEventWorkspace'
| 'EditEventWorkspace'
| 'EnrollmentComment'
| 'EventComment'
| 'EnrollmentNote'
| 'EventNote'
| 'TrackedEntityRelationship'
| 'ErrorWidget'
| 'WarningWidget'
Expand Down
23 changes: 20 additions & 3 deletions i18n/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,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 @@ -1484,13 +1487,27 @@ msgstr ""
msgid "New {{ eventName }} event"
msgstr ""

msgid "To open this event, please wait until saving is complete"
msgid "An error occurred while deleting the event"
msgstr ""

msgid "Show {{ rest }} more"
msgid ""
"Deleting an event is permanent and cannot be undone. Are you sure you want "
"to delete this event?"
msgstr ""

msgid "An error occurred when updating event status"
msgstr ""

msgid "Reset list"
msgid "Unskip"
msgstr ""

msgid "Skip"
msgstr "تخطى"

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

msgid "Show {{ rest }} more"
msgstr ""

msgid "Go to full {{ eventName }}"
Expand Down
Loading

0 comments on commit 067bb56

Please sign in to comment.