Skip to content

Commit

Permalink
Merge branch 'master' into TECH-1627
Browse files Browse the repository at this point in the history
  • Loading branch information
superskip committed Nov 10, 2023
2 parents 0ff1c94 + 2bf12a6 commit faf7c5e
Show file tree
Hide file tree
Showing 416 changed files with 10,906 additions and 3,044 deletions.
2 changes: 1 addition & 1 deletion .cypress-cucumber-preprocessorrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"nonGlobalStepDefinitions": true
}
}
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
REACT_APP_CACHE_VERSION=$npm_package_cacheVersion
REACT_APP_SERVER_VERSION=$npm_package_serverVersion
REACT_APP_VERSION=$npm_package_version
# TODO: Remove this when upgrading to react-scripts 5 (and webpack 5)
NODE_OPTIONS=--openssl-legacy-provider
10 changes: 5 additions & 5 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,17 @@ jobs:
needs: prerequisites
if: contains(fromJson(needs.prerequisites.outputs.json-labels), github.event.label.name)
runs-on: ubuntu-latest
container: cypress/browsers:node14.7.0-chrome84
strategy:
fail-fast: false
matrix:
versions: ${{ fromJSON(needs.prerequisites.outputs.versions) }}
containers: ${{ fromJSON(needs.prerequisites.outputs.matrix-containers) }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- name: compute-instance-url
id: instance-url
Expand All @@ -98,7 +97,7 @@ jobs:
version: ${{ matrix.versions }}

- name: Cypress run
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v6
with:
record: true
parallel: true
Expand All @@ -115,6 +114,7 @@ jobs:
CYPRESS_dhis2InstanceVersion: ${{matrix.versions}}
CYPRESS_dhis2Username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
CYPRESS_dhis2Password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
NODE_OPTIONS: "--openssl-legacy-provider"

call-e2e-tests-result:
needs: cypress
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ on:
pull_request:
types: [ labeled ]

jobs:
jobs:
preview:
runs-on: ubuntu-latest
if: (github.event.label.name == 'preview' || github.event.label.name == 'testing') && !github.event.push.repository.fork && github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -40,10 +40,10 @@ jobs:
needs: install
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -59,10 +59,10 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -78,10 +78,10 @@ jobs:
needs: install
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -91,7 +91,7 @@ jobs:

- name: Unit tests
run: yarn test

instance-version:
runs-on: ubuntu-latest
needs: [lint, flow, unit-tests]
Expand All @@ -105,11 +105,10 @@ jobs:
instance-url: ${{ secrets.CYPRESS_DHIS2_INSTANCES_BASE_URL }}/ca-test-dev
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}

cypress-dev:
runs-on: ubuntu-latest
needs: instance-version
container: cypress/browsers:node14.7.0-chrome84
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
Expand All @@ -119,13 +118,13 @@ jobs:
matrix:
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- name: Cypress run
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v6
with:
record: true
parallel: true
Expand All @@ -142,16 +141,17 @@ jobs:
CYPRESS_dhis2InstanceVersion: ${{ needs.instance-version.outputs.version }}
CYPRESS_dhis2Username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
CYPRESS_dhis2Password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
NODE_OPTIONS: "--openssl-legacy-provider"

build:
runs-on: ubuntu-latest
needs: [lint, flow, unit-tests]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -175,13 +175,13 @@ jobs:
needs: build
if: "!github.event.push.repository.fork && !contains(github.event.head_commit.message, '[skip ci]') && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ env.GH_TOKEN }}

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/download-artifact@v2
with:
Expand Down
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
## [100.44.4](https://github.com/dhis2/capture-app/compare/v100.44.3...v100.44.4) (2023-11-10)


### Bug Fixes

* [DHIS2-15383] align mandatory behaviour for all value types ([#3413](https://github.com/dhis2/capture-app/issues/3413)) ([b0eddc7](https://github.com/dhis2/capture-app/commit/b0eddc76b674ceb20df0eb5bcd0672a3c42d3954))

## [100.44.3](https://github.com/dhis2/capture-app/compare/v100.44.2...v100.44.3) (2023-11-10)


### Bug Fixes

* [DHIS2-15814] missing orgunit names ([#3449](https://github.com/dhis2/capture-app/issues/3449)) ([488f8c0](https://github.com/dhis2/capture-app/commit/488f8c090680ad47ed693214478a7ef2919b82e7))

## [100.44.2](https://github.com/dhis2/capture-app/compare/v100.44.1...v100.44.2) (2023-11-05)


### Bug Fixes

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

## [100.44.1](https://github.com/dhis2/capture-app/compare/v100.44.0...v100.44.1) (2023-11-02)


### Bug Fixes

* [DHIS2-15945] translations in enrollment widget ([#3433](https://github.com/dhis2/capture-app/issues/3433)) ([c188767](https://github.com/dhis2/capture-app/commit/c1887673e56f2f73cfc594b682d471c10858c0fd))

# [100.44.0](https://github.com/dhis2/capture-app/compare/v100.43.0...v100.44.0) (2023-11-01)


### Features

* [DHIS2-15483] assign an user when scheduling an enrollment event ([#3419](https://github.com/dhis2/capture-app/issues/3419)) ([556884f](https://github.com/dhis2/capture-app/commit/556884f7302215c31b7be433bbeb24503ea9b12d))

# [100.43.0](https://github.com/dhis2/capture-app/compare/v100.42.0...v100.43.0) (2023-10-31)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([9636ea1](https://github.com/dhis2/capture-app/commit/9636ea1e8f54685b2c5ca65fd7b49cd3f5d5f846))
* [DHIS2-15879] Unable to schedule event with note ([#3421](https://github.com/dhis2/capture-app/issues/3421)) ([e017ac8](https://github.com/dhis2/capture-app/commit/e017ac8e3df69c4803d2e6f73aa9a585984a008f))


### Features

* [DHIS-14012] removed download as XML button ([#3434](https://github.com/dhis2/capture-app/issues/3434)) ([7b0e387](https://github.com/dhis2/capture-app/commit/7b0e3871c76478aabfd6696a8e7ac27339254299))

# [100.42.0](https://github.com/dhis2/capture-app/compare/v100.41.4...v100.42.0) (2023-10-24)


### Features

* [DHIS2-12361] Tracked Entity Relationships widget ([cafed8d](https://github.com/dhis2/capture-app/commit/cafed8d8aac3fe9955739b1a8ee2cdde57722967))

## [100.41.4](https://github.com/dhis2/capture-app/compare/v100.41.3...v100.41.4) (2023-10-22)


### Bug Fixes

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

## [100.41.3](https://github.com/dhis2/capture-app/compare/v100.41.2...v100.41.3) (2023-10-16)


### Bug Fixes

* [DHIS2-15782] navigation with program stage filter ([#3431](https://github.com/dhis2/capture-app/issues/3431)) ([8f7a017](https://github.com/dhis2/capture-app/commit/8f7a017c5860104620c6b7fc8c20916b00037302))

## [100.41.2](https://github.com/dhis2/capture-app/compare/v100.41.1...v100.41.2) (2023-10-12)


Expand Down
2 changes: 1 addition & 1 deletion config/eslint/alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ if (fileExists(path.resolve(__dirname, '../../src/core_modules/capture-core')))
alias['capture-core-utils'] = path.resolve(__dirname, '../../src/core_modules/capture-core-utils');
}

module.exports = alias;
module.exports = alias;
35 changes: 35 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const { chromeAllowXSiteCookies } = require('@dhis2/cypress-plugins');
const { defineConfig } = require('cypress');
const getCypressEnvVariables = require('./cypress/support/getCypressEnvVariables');
const cucumberPreprocessor = require('./cypress/support/cucumberPreprocessor');

async function setupNodeEvents(on, config) {
await chromeAllowXSiteCookies(on);
await cucumberPreprocessor(on, config);

config.env = getCypressEnvVariables(config);
return config;
}

module.exports = defineConfig({
video: true,
dhis2_datatest_prefix: 'dhis2-capture',
chromeWebSecurityComment:
'chromeWebSecurity should removed once https://github.com/cypress-io/cypress/issues/4220 is fixed',
chromeWebSecurity: false,
defaultCommandTimeout: 25000,
projectId: '322xnh',
experimentalFetchPolyfill: true,
retries: {
runMode: 3,
},
env: {
dhis2DataTestPrefix: 'capture-app',
networkMode: 'live',
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.feature',
},
});
18 changes: 0 additions & 18 deletions cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';

import '../sharedSteps';

Given('the user is on the the main page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Feature: User interacts with the Enrollment New Event Workspace

Scenario: User should be asked to create new event after completing a stage and choose to cancel
Given you open the main page with Ngelehun and Malaria focus investigation context
And you opt in to use the new enrollment Dashboard for Malaria focus investigation
And you opt in to use the new enrollment Dashboard for Malaria focus investigation
Then you land on the enrollment new event page by having typed #/enrollmentEventNew?enrollmentId=zRfAPUpjoG3&orgUnitId=DiszpKrYNg8&programId=M3xtLkYBlKI&stageId=CWaAcQYKVpq&teiId=S3JjTA4QMNe
Then you see the following Enrollment: New Event
And you see the widget header Foci investigation & classification
Expand All @@ -72,3 +72,9 @@ Feature: User interacts with the Enrollment New Event Workspace
When you choose option Yes, create new event in the modal
Then you will be navigate to page #/enrollmentEventNew?enrollmentId=zRfAPUpjoG3&orgUnitId=DiszpKrYNg8&programId=M3xtLkYBlKI&teiId=S3JjTA4QMNe

Scenario: User is able to schedule an event with a note
Given you land on the enrollment new event page by having typed /#/enrollmentEventNew?enrollmentId=qcFFRp7DpcX&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&stageId=edqlbukwRfQ&teiId=erqa3phUfpI
And you see the following Enrollment: New Event
And you select the schedule tab
When you add a comment to the event
And the events saves successfully
Loading

0 comments on commit faf7c5e

Please sign in to comment.