Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-15475…
Browse files Browse the repository at this point in the history
…_SwitchToPluginComponent
  • Loading branch information
eirikhaugstulen committed Sep 20, 2023
2 parents 62b6ab2 + a153053 commit b3fb24d
Show file tree
Hide file tree
Showing 139 changed files with 4,015 additions and 2,676 deletions.
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[main]
host = https://www.transifex.com
lang_map = fa_AF: prs, uz@Cyrl: uz, uz@Latn: uz_Latn
lang_map = fa_AF: prs, uz@Cyrl: uz_UZ_Cyrl, uz@Latn: uz_UZ_Latn

[o:hisp-uio:p:app-capture-app:r:en-pot]
file_filter = i18n/<lang>.po
Expand Down
133 changes: 133 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,136 @@
# [100.40.0](https://github.com/dhis2/capture-app/compare/v100.39.4...v100.40.0) (2023-09-20)


### Features

* [DHIS2-15830] Add orgUnitId to plugin context ([b9ec237](https://github.com/dhis2/capture-app/commit/b9ec237af595a1112dc6db01206e8332c9bb6647))

## [100.39.4](https://github.com/dhis2/capture-app/compare/v100.39.3...v100.39.4) (2023-09-19)


### Bug Fixes

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

## [100.39.3](https://github.com/dhis2/capture-app/compare/v100.39.2...v100.39.3) (2023-09-14)


### Bug Fixes

* [DHIS2-15356] change tei search parameter from `ou` to `orgUnit` ([#3362](https://github.com/dhis2/capture-app/issues/3362)) ([c7ab828](https://github.com/dhis2/capture-app/commit/c7ab82826254be24959ff25d643b68c1e525c893))

## [100.39.2](https://github.com/dhis2/capture-app/compare/v100.39.1...v100.39.2) (2023-09-14)


### Bug Fixes

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

## [100.39.1](https://github.com/dhis2/capture-app/compare/v100.39.0...v100.39.1) (2023-09-13)


### Bug Fixes

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

# [100.39.0](https://github.com/dhis2/capture-app/compare/v100.38.0...v100.39.0) (2023-09-07)


### Features

* [DHIS2-13343] hidden program stage rule effect ([#3406](https://github.com/dhis2/capture-app/issues/3406)) ([4ef2973](https://github.com/dhis2/capture-app/commit/4ef2973b71d6376f99db07e70bc4d51facb8018e))

# [100.38.0](https://github.com/dhis2/capture-app/compare/v100.37.0...v100.38.0) (2023-09-06)


### Features

* [DHIS2-14334] edit enrollment date ([#3350](https://github.com/dhis2/capture-app/issues/3350)) ([9dd1b6a](https://github.com/dhis2/capture-app/commit/9dd1b6a046e94021ae4e63a67a3d6b16a099212d))

# [100.37.0](https://github.com/dhis2/capture-app/compare/v100.36.0...v100.37.0) (2023-08-22)


### Features

* [DHIS2-15299] escape value for attribute filter ([#3403](https://github.com/dhis2/capture-app/issues/3403)) ([5db743e](https://github.com/dhis2/capture-app/commit/5db743eaf7f67bbb4a9391ac9ade25317e4d3642))

# [100.36.0](https://github.com/dhis2/capture-app/compare/v100.35.9...v100.36.0) (2023-08-22)


### Features

* [DHIS2-15229] search for MULTI_TEXT ([#3395](https://github.com/dhis2/capture-app/issues/3395)) ([c5d9a7d](https://github.com/dhis2/capture-app/commit/c5d9a7d57547153dd62cf36c8e3323685f43978f))

## [100.35.9](https://github.com/dhis2/capture-app/compare/v100.35.8...v100.35.9) (2023-08-22)


### Bug Fixes

* [DHIS2-15700] Option sets not working in TEI Registration ([2e47477](https://github.com/dhis2/capture-app/commit/2e4747719151b042d3539fe61a612ebd0ac122d4))

## [100.35.8](https://github.com/dhis2/capture-app/compare/v100.35.7...v100.35.8) (2023-08-22)


### Bug Fixes

* [DHIS2-15492] transition of tooltip enabled state ([#3381](https://github.com/dhis2/capture-app/issues/3381)) ([adb6b32](https://github.com/dhis2/capture-app/commit/adb6b32f1bffc5020ca34ab5c7568b5a323a8002))

## [100.35.7](https://github.com/dhis2/capture-app/compare/v100.35.6...v100.35.7) (2023-08-15)


### Bug Fixes

* [DHIS2-15525] show formNames in the enrollment dashboard ([#3402](https://github.com/dhis2/capture-app/issues/3402)) ([c02c3ee](https://github.com/dhis2/capture-app/commit/c02c3ee46ed4209215946636682ec86c97c9d905))

## [100.35.6](https://github.com/dhis2/capture-app/compare/v100.35.5...v100.35.6) (2023-08-11)


### Bug Fixes

* [TECH-1623] rename TEI "Launchpad McQuack" -> "Breaking TheGlass" ([#3400](https://github.com/dhis2/capture-app/issues/3400)) ([7f26237](https://github.com/dhis2/capture-app/commit/7f262372499b98d9fd8071c7b8069238ad3a1d15))

## [100.35.5](https://github.com/dhis2/capture-app/compare/v100.35.4...v100.35.5) (2023-08-03)


### Bug Fixes

* [DHIS2-15365] remove orgUnit and ouMode query args ([#3398](https://github.com/dhis2/capture-app/issues/3398)) ([ef35eb3](https://github.com/dhis2/capture-app/commit/ef35eb300fa61343576957e6734a2767dc37b4ec))

## [100.35.4](https://github.com/dhis2/capture-app/compare/v100.35.3...v100.35.4) (2023-08-01)


### Bug Fixes

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

## [100.35.3](https://github.com/dhis2/capture-app/compare/v100.35.2...v100.35.3) (2023-07-27)


### Bug Fixes

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

## [100.35.2](https://github.com/dhis2/capture-app/compare/v100.35.1...v100.35.2) (2023-07-26)


### Bug Fixes

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

## [100.35.1](https://github.com/dhis2/capture-app/compare/v100.35.0...v100.35.1) (2023-07-25)


### Bug Fixes

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

# [100.35.0](https://github.com/dhis2/capture-app/compare/v100.34.1...v100.35.0) (2023-07-24)


### Features

* [DHIS2-14775][DHIS2-14729] Render data entry plugins ([80a218e](https://github.com/dhis2/capture-app/commit/80a218e2dea3f4b25694b25e491dac20a310b8bb))

## [100.34.1](https://github.com/dhis2/capture-app/compare/v100.34.0...v100.34.1) (2023-07-12)


Expand Down
10 changes: 5 additions & 5 deletions cypress/integration/EnrollmentPage/BreakingTheGlass/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../sharedSteps';

Given('the tei created by this test is cleared from the database', () => {
cy.buildApiUrl('tracker', 'trackedEntities?filter=w75KJ2mc4zz:like:Launchpad&filter=zDhUuAYrxNC:like:McQuack&trackedEntityType=nEenWmSyUEp&page=1&pageSize=5&ouMode=ACCESSIBLE')
cy.buildApiUrl('tracker', 'trackedEntities?filter=w75KJ2mc4zz:like:Breaking&filter=zDhUuAYrxNC:like:TheGlass&trackedEntityType=nEenWmSyUEp&page=1&pageSize=5&ouMode=ACCESSIBLE')
.then(url => cy.request(url))
.then(({ body }) =>
body.instances.forEach(({ trackedEntity }) =>
Expand All @@ -24,12 +24,12 @@ And('you create a new tei in Child programme from Ngelehun CHC', () => {
cy.get('[data-test="d2-form-component"]')
.find('[data-test="capture-ui-input"]')
.eq(0)
.type('Launchpad')
.type('Breaking')
.blur();
cy.get('[data-test="d2-form-component"]')
.find('[data-test="capture-ui-input"]')
.eq(1)
.type('McQuack')
.type('TheGlass')
.blur();

clickSave();
Expand Down Expand Up @@ -61,7 +61,7 @@ And('you enroll the tei from Njandama MCHP', () => {
.click();

cy.get('[data-test="enrollment-page-content"]')
.contains('Enroll Launchpad McQuack in this program')
.contains('Enroll Breaking TheGlass in this program')
.click();

cy.get('[data-test="d2-form-component"]')
Expand Down Expand Up @@ -97,7 +97,7 @@ And('you log in as tracker2 user', () => {

And('you select the new tei', () => {
cy.visit('/#/?orgUnitId=DiszpKrYNg8&programId=IpHINAT79UW');
cy.contains('Launchpad')
cy.contains('Breaking')
.click();
// Wait for enrollment dashboard
cy.get('[data-test="profile-widget"]')
Expand Down
7 changes: 7 additions & 0 deletions cypress/integration/EnrollmentPage/HiddenProgramStage.feature
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 cypress/integration/EnrollmentPage/HiddenProgramStage/index.js
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');
});
8 changes: 0 additions & 8 deletions cypress/integration/SearchPage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ Feature: User interacts with Search page
# And you click search
# Then you should see no results found

Scenario: Searching using attributes in Tracker Program throws error
Given you are on the default search page
When you select the search domain Malaria Case diagnosis
And you expand the attributes search area
And you fill in the first name with values that will return an error
And you click search
Then there should be an generic error message

Scenario: Searching using attributes in Tracker Program is invalid because no terms typed
Given you are on the default search page
When you select the search domain Malaria Case diagnosis
Expand Down
13 changes: 0 additions & 13 deletions cypress/integration/SearchPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,6 @@ When('for Person you fill in values that will return less than 5 results', () =>
.blur();
});

When('you fill in the first name with values that will return an error', () => {
cy.get('[data-test="form-attributes"]')
.find('[data-test="capture-ui-input"]')
.first()
.type(',,,,')
.blur();
});

Then('there should be an generic error message', () => {
cy.get('[data-test="general-purpose-error-mesage"]')
.should('exist');
});

When('you dont fill in any of the values', () => {
cy.get('[data-test="form-attributes"]')
.find('[data-test="capture-ui-input"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ Then('the enrollment widget should be opened', () => {
});

Then('the user sees the enrollment date', () => {
cy.get('[data-test="widget-enrollment"]').within(() => {
cy.get('[data-test="widget-enrollment-enrollment-date"]').within(() => {
cy.get('[data-test="widget-enrollment-icon-calendar"]').should('exist');
cy.get('[data-test="widget-enrollment-enrollment-date"]')
.contains(`Date of enrollment ${getCurrentYear()}-08-01`)
cy.get('[data-test="widget-enrollment-date"]')
.contains(`Date of enrollment: ${getCurrentYear()}-08-01`)
.should('exist');
});
});

Then('the user sees the incident date', () => {
cy.get('[data-test="widget-enrollment"]').within(() => {
cy.get('[data-test="widget-enrollment-incident-date"]')
.contains(`Date of birth ${getCurrentYear()}-08-01`)
cy.get('[data-test="widget-enrollment-incident-date"]').within(() => {
cy.get('[data-test="widget-enrollment-date"]')
.contains(`Date of birth: ${getCurrentYear()}-08-01`)
.should('exist');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Then('the list should display the events retrieved from the api', () => {
cy.get('[data-test="event-working-lists"]')
.find('tr')
.each(($teiRow, index) => {
const rowId = $teiRow.get(0).getAttribute('id');
const rowId = $teiRow.get(0).getAttribute('data-test');
if (index > 1) {
expect(rowId).to.equal(teis[index - 1].event);
}
Expand Down Expand Up @@ -232,25 +232,27 @@ When('you click the report date column header', () => {

cy.route('GET', '**/tracker/events**').as('getEvents');

cy.get('[data-test="online-list-table"]')
.contains('Report date')
cy.get('[data-test="dhis2-uicore-tableheadercellaction"]')
.eq(0)
.click()
.click();
});

Then('events should be retrieved from the api ordered ascendingly by report date', () => {
cy.wait('@getEvents', { timeout: 40000 }).as('result');
cy.wait('@getEvents', { timeout: 40000 }).as('resultDefault');
cy.wait('@getEvents', { timeout: 40000 }).as('resultAsc');

cy.get('@result')
cy.get('@resultAsc')
.its('status')
.should('equal', 200);

cy.get('@result')
cy.get('@resultAsc')
.its('url')
.should('match', /order=.*asc/);

cy.get('@result')
cy.get('@resultAsc')
.its('url')
.should('include', 'page=1');

cy.get('@result').its('response.body.instances').as('events');
cy.get('@resultAsc').its('response.body.instances').as('events');
});
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ Then('the list should display 10 rows of data', () => {
});

When('you click the report date column header', () => {
cy.get('[data-test="online-list-table"]')
.contains('Report date')
cy.get('[data-test="dhis2-uicore-tableheadercellaction"]')
.eq(0)
.click()
.click();
});

Expand Down Expand Up @@ -364,8 +365,9 @@ When('you change the sharing settings', () => {


When('you update the working list', () => {
cy.get('[data-test="online-list-table"]')
.contains('Report date')
cy.get('[data-test="dhis2-uicore-tableheadercellaction"]')
.eq(0)
.click()
.click();

cy.get('[data-test="list-view-menu-button"]')
Expand Down
Loading

0 comments on commit b3fb24d

Please sign in to comment.