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 Dec 3, 2024
2 parents 7cf7867 + f39fd47 commit ed637cb
Show file tree
Hide file tree
Showing 118 changed files with 7,029 additions and 1,996 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
lint-pr-title:
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'dhis2-bot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,6 +19,7 @@ jobs:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

lint-commits:
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'dhis2-bot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [101.18.1](https://github.com/dhis2/capture-app/compare/v101.18.0...v101.18.1) (2024-12-03)


### Bug Fixes

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

# [101.18.0](https://github.com/dhis2/capture-app/compare/v101.17.0...v101.18.0) (2024-11-28)


### Features

* [DHIS2-16337] Org unit in view event page ([#3882](https://github.com/dhis2/capture-app/issues/3882)) ([c605e82](https://github.com/dhis2/capture-app/commit/c605e828622aa9f9b0c10f96359ba1b037c8e0ee))

# [101.17.0](https://github.com/dhis2/capture-app/compare/v101.16.7...v101.17.0) (2024-11-25)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ When(/^you click the create new button number (.*)$/, (eq) => {
});

When(/^you type (.*) in the input number (.*)$/, (value, eq) => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(eq)
.type(value)
.blur();
Expand Down Expand Up @@ -155,7 +155,7 @@ When(/^the user selects (.*)$/, (value) => {
});

When(/^you focus and blur a required field/, () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.focus()
.blur();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ When(/^the user clicks on the cancel button/, () =>
When(/^the user set the apgar score to (.*)/, score =>
cy
.get('[data-test="widget-enrollment-event"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(2)
.clear()
.type(score)
Expand Down Expand Up @@ -118,8 +118,8 @@ When('the user clicks switch tab to Schedule', () => {

Then('the user selects another schedule date', () => {
cy.get('[data-test="schedule-section"]').within(() => {
cy.get("[data-test='capture-ui-input']").eq(0).should('have.value', `${getCurrentYear() - 15}-01-07`);
cy.get("[data-test='capture-ui-input']").eq(0)
cy.get('input[type="text"]').eq(0).should('have.value', `${getCurrentYear() - 15}-01-07`);
cy.get('input[type="text"]').eq(0)
.clear()
.type(`${getCurrentYear()}-08-01`)
.blur();
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/EnrollmentPage/BreakingTheGlass/BreakingTheGlass.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ Given('the tei created by this test is cleared from the database', () => {

And('you create a new tei in Child programme from Ngelehun CHC', () => {
cy.visit('/#/new?orgUnitId=DiszpKrYNg8&programId=IpHINAT79UW');
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type('1999-09-01')
.blur();
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(0)
.type('Breaking')
.blur();
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(1)
.type('TheGlass')
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(7)
.type('2023-09-01')
.blur();
Expand Down Expand Up @@ -68,7 +68,7 @@ And('you enroll the tei from Njandama MCHP', () => {
.click();

cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(8)
.type('1999-09-01')
.blur();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Given('you add an enrollment event that will result in a rule effect to hide a p
'/#/enrollmentEventNew?enrollmentId=fmhIsWXVDmS&orgUnitId=s7SLtx8wmRA&programId=WSGAb5XwJ3Y&stageId=PFDfvmGpsR3&teiId=uW8Y7AIcRKA',
);

cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(0)
.type(moment().format('YYYY-MM-DD'))
.blur();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ After({ tags: '@with-restore-deleted-event' }, () => {
.find('[data-test="create-new-button"]')
.click();

cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.first()
.type('2023-01-26')
.blur();
Expand Down
58 changes: 29 additions & 29 deletions cypress/e2e/NewPage/NewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Then('you see validation error on visit date', () => {
});

And('you fill in 200 in the hemoglobin', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type('200');
});
Expand All @@ -340,13 +340,13 @@ And('you see validation error on hemoglobin', () => {
});

And('you fill in the visit date', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(0)
.type(`${getCurrentYear()}-01-01`);
.type(`${getCurrentYear()}-01-01`).blur();
});

And('you fill in the hemoglobin', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type('50');
});
Expand Down Expand Up @@ -389,14 +389,14 @@ And('you are in the Person registration page', () => {
});

And('you fill in the first name with value that has duplicates', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type('Sarah')
.blur();
});

And('you fill in a unique first name', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type(`Sarah-${Math.round((new Date()).getTime() / 1000)}`)
.blur();
Expand Down Expand Up @@ -427,7 +427,7 @@ 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"]')
cy.get('input[type="text"]')
.eq(1)
.invoke('val').should('not.be.empty');
});
Expand All @@ -441,7 +441,7 @@ And('you are in Child programme and Buma MCHP organization unit registration pag
});

And('you fill the form with age 0', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(9)
.type(moment().format('YYYY-MM-DD'))
.blur();
Expand All @@ -454,56 +454,56 @@ And('you see validation warning on birth date', () => {
});

And('you fill the WHO RMNCH program registration form with its required unique values', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(2)
.type(`Sarah-${Math.round((new Date()).getTime() / 1000)}`);

cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(3)
.type('Gonzales');

cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(9)
.type('1992-01-01')
.blur();
});

And('you fill the WHO RMNCH program registration form with its required values', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(3)
.type('Didriksson');

cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(2)
.type('Ava');

cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(9)
.type('1985-10-01')
.blur();
});

And('you fill in child programme first name with value that has duplicates', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(4)
.type('Sarah')
.blur();
});


And('you fill the Child programme registration form with a first name with value that has duplicates', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type('2021-01-01')
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(4)
.type('Sarah')
.blur();
});

And('you fill in the birth report date', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(7)
.type('2023-01-01')
.blur();
Expand All @@ -530,9 +530,9 @@ And('you see the form prefield with existing TEI attributes values', () => {
cy.get('[data-test="registration-page-content"]').within(() => {
cy.contains('New Enrollment in program: Child Programme').should('exist');
cy.contains('First name').should('exist');
cy.get('[data-test="capture-ui-input"]').eq(4).should('have.value', 'Anna');
cy.get('input[type="text"]').eq(4).should('have.value', 'Anna');
cy.contains('Last name').should('exist');
cy.get('[data-test="capture-ui-input"]').eq(5).should('have.value', 'Jones');
cy.get('input[type="text"]').eq(5).should('have.value', 'Jones');
cy.contains('Gender').should('exist');
cy.contains('Female').should('exist');
});
Expand All @@ -554,15 +554,15 @@ Given('you open the main page with Ngelehun and Malaria case diagnosis, treatmen
});

And('you fill the Malaria case diagnosis registration form with values', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(3)
.type(`Ana-${Math.round((new Date()).getTime() / 1000)}`)
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(4)
.type(`Maria-${Math.round((new Date()).getTime() / 1000)}`)
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(5)
.type(moment().add(-1, 'day').format('YYYY-MM-DD'))
.blur();
Expand Down Expand Up @@ -602,26 +602,26 @@ Then('the first stage appears on registration page', () => {
});

And('you fill the Child Program program registration form with unique values', () => {
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(1)
.type('2021-01-01')
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(2)
.type(20);
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(3)
.type(30)
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(4)
.type(`Sarah-${Math.round((new Date()).getTime() / 1000)}`)
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(5)
.type(`Beth-${Math.round((new Date()).getTime() / 1000)}`)
.blur();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.eq(7)
.type('2021-01-01')
.blur();
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/ScopeSelector/ScopeSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Given('you are in the main page with program preselected', () => {
Given('you select both org unit and program Malaria case registration', () => {
cy.get('[data-test="org-unit-selector-container"]')
.click();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.type('Ngelehun C');
cy.contains('Ngelehun CHC')
.click();
Expand All @@ -67,7 +67,7 @@ Given('you select both org unit and program Malaria case registration', () => {
Given('you select both org unit and program Child Programme', () => {
cy.get('[data-test="org-unit-selector-container"]')
.click();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.type('Ngelehun C');
cy.contains('Ngelehun CHC')
.click();
Expand Down Expand Up @@ -359,7 +359,7 @@ And('you see message explaining this is an Event program', () => {
When('you select org unit that is incompatible with the already selected program', () => {
cy.get('[data-test="org-unit-selector-container"]')
.click();
cy.get('[data-test="capture-ui-input"]')
cy.get('input[type="text"]')
.type('Biriw');
cy.contains('Biriwa')
.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { When, defineStep as And } from '@badeball/cypress-cucumber-preprocessor

And('you fill in the first name with values that have duplicates', () => {
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(1)
.wait(500)
.type('Tesmi')
Expand All @@ -11,26 +11,26 @@ And('you fill in the first name with values that have duplicates', () => {

And('you fill in the first name with values that have less than 5 duplicates', () => {
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(1)
.type('Sarah')
.blur();
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(2)
.type('Fis')
.blur();
});

And('you fill in the first name with values that have exactly 5 duplicates', () => {
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(1)
.wait(500)
.type('Tesmi')
.blur();
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.find('input[type="text"]')
.eq(2)
.type('Abel')
.blur();
Expand Down
Loading

0 comments on commit ed637cb

Please sign in to comment.