Skip to content

Commit

Permalink
Merge branch 'develop' into configurable-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangetsu101 committed Dec 23, 2024
2 parents 978b36e + 1d5593a commit 6749da9
Show file tree
Hide file tree
Showing 68 changed files with 1,246 additions and 701 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: trstringer/manual-approval@v1
with:
secret: ${{ github.TOKEN }}
approvers: euanmillar,rikukissa
approvers: euanmillar,rikukissa,alsmk
minimum-approvals: 1
issue-title: 'Deploy (${{ github.event.inputs.environment }}): core: ${{ github.event.inputs.core-image-tag }} country config: ${{ github.event.inputs.countryconfig-image-tag }}'
issue-body: 'Please approve or deny the deployment of core: ${{ github.event.inputs.core-image-tag }} country config: ${{ github.event.inputs.countryconfig-image-tag }} to ${{ github.event.inputs.environment }}'
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- "Publish release" pipeline now correctly uses the "Branch to build from" value as the branch to be tagged. Previously it tried tagging "master". "Release tag" is also now used as the release version as is instead of it being read from `package.json`.
- Backup process now doesn't require internet connection to download docker images thus working more reliably when internet connections are unreliable. Previously non-active images were cleaned nightly, now we only do it as part of deployment. [#7896](https://github.com/opencrvs/opencrvs-core/issues/7896)
- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).
- Previously it was possible MongoDB replica set and users were left randomly uninitialised after a deployment. MongoDB initialisation container now retries on failure.
- On some machines 'file' utility was not preinstalled causing provision to fail. We now install the utility if it doesn't exist.

### Breaking changes

Expand Down Expand Up @@ -49,8 +51,11 @@ INSERT CSV ROWS IN ENGLISH ONLY
### Bug fixes

- Fix a typo in the birth certificate svg code that was causing the birth certificate to fail to render in the `print certified copy` flow. [7886](https://github.com/opencrvs/opencrvs-core/issues/7886)
- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).
- Previously it was possible MongoDB replica set and users were left randomly uninitialised after a deployment. MongoDB initialisation container now retries on failure.
- On some machines 'file' utility was not preinstalled causing provision to fail. We now install the utility if it doesn't exist.

## 1.6.0 Release candidate
## 1.6.0

### Breaking changes

Expand Down Expand Up @@ -97,6 +102,7 @@ INSERT CSV ROWS IN ENGLISH ONLY
5. 'PHONE_NUMBER',
6. 'EMAIL'
- Updated `allowedFileFormats` in signature fields to use MIME types (`image/png`, `image/jpg`, `image/jpeg`, `image/svg`) instead of simple file extensions. If you are already using the `allowedFileFormats` field in your implementation, please ensure to update the format accordingly.
- The details exists conditionals for the various sections i.e. father, mother, spouse has to use the `values.detailsExist` property instead of accessing it from `draftData.[sectionName].detailsExists`. This is due to the fact that the draftData is not populated until any changes have been made to any of the fields in the current section.

### New features

Expand Down Expand Up @@ -131,6 +137,7 @@ INSERT CSV ROWS IN ENGLISH ONLY
- Github pipeline dedicated for reading secrets and variables from other environments now checks if GH_TOKEN is still valid before attempting other operations
- Remove unnecessary UI dividers that add in various sections of the declaration forms(e.g the Death, Birth and Marriage forms) [#244](https://github.com/opencrvs/opencrvs-countryconfig/pull/244)
- Update template transformer for fields `informantType` and `otherInformantType` that fixes the bug of unavailability of these template fields [#5952](https://github.com/opencrvs/opencrvs-countryconfig/pull/5952)
- Fixed missing InitialValue property to set initial values based on an expression

## 1.5.2 (https://github.com/opencrvs/opencrvs-countryconfig/compare/v1.5.1...v1.5.2)

Expand Down
1 change: 1 addition & 0 deletions e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from './constants'
import { format, parseISO } from 'date-fns'
import { isArray, random } from 'lodash'
import fetch from 'node-fetch'

export async function login(page: Page, username: string, password: string) {
const token = await getToken(username, password)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getToken,
login
} from '../../helpers'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { createDeclaration } from '../birth/helpers'
import TEST_DATA_1 from '../birth/data/1-both-mother-and-father.json'
import { CREDENTIALS } from '../../constants'
Expand All @@ -25,8 +25,8 @@ test.describe
const token = await getToken('k.mweene', 'test')
const res = await createDeclaration(token, {
child: {
firstNames: faker.name.firstName(),
familyName: faker.name.firstName(),
firstNames: faker.person.firstName(),
familyName: faker.person.firstName(),
gender: TEST_DATA_1['Child details'].Sex.toLowerCase() as 'male'
},
informant: {
Expand All @@ -40,12 +40,12 @@ test.describe
].toUpperCase() as 'PHYSICIAN'
},
mother: {
firstNames: faker.name.firstName(),
familyName: faker.name.firstName()
firstNames: faker.person.firstName(),
familyName: faker.person.firstName()
},
father: {
firstNames: faker.name.firstName(),
familyName: faker.name.firstName()
firstNames: faker.person.firstName(),
familyName: faker.person.firstName()
}
})
expect(res).toStrictEqual({
Expand Down
14 changes: 7 additions & 7 deletions e2e/testcases/birth/1-birth-event-declaration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createPIN, getToken, login } from '../../helpers'
import { createDeclaration } from './helpers'

import TEST_DATA_1 from './data/1-both-mother-and-father.json'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { CREDENTIALS } from '../../constants'

test.describe('1. Birth event declaration', () => {
Expand Down Expand Up @@ -569,8 +569,8 @@ test.describe('1. Birth event declaration', () => {
const token = await getToken('k.mweene', 'test')
const res = await createDeclaration(token, {
child: {
firstNames: faker.name.firstName(),
familyName: faker.name.firstName(),
firstNames: faker.person.firstName(),
familyName: faker.person.firstName(),
gender: TEST_DATA_1['Child details'].Sex.toLowerCase() as 'male'
},
informant: {
Expand All @@ -584,12 +584,12 @@ test.describe('1. Birth event declaration', () => {
].toUpperCase() as 'PHYSICIAN'
},
mother: {
firstNames: faker.name.firstName(),
familyName: faker.name.firstName()
firstNames: faker.person.firstName(),
familyName: faker.person.firstName()
},
father: {
firstNames: faker.name.firstName(),
familyName: faker.name.firstName()
firstNames: faker.person.firstName(),
familyName: faker.person.firstName()
}
})
expect(res).toStrictEqual({
Expand Down
36 changes: 18 additions & 18 deletions e2e/testcases/birth/8-validate-declaration-review-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import {
getAction,
assignRecord
} from '../../helpers'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { CREDENTIALS } from '../../constants'

test.describe.serial('8. Validate declaration review page', () => {
let page: Page
const declaration = {
child: {
name: {
firstNames: faker.name.firstName('male'),
familyName: faker.name.lastName('male')
firstNames: faker.person.firstName('male'),
familyName: faker.person.lastName('male')
},
gender: 'Male',
birthDate: getRandomDate(0, 200)
Expand All @@ -35,13 +35,13 @@ test.describe.serial('8. Validate declaration review page', () => {
informantEmail: faker.internet.email(),
mother: {
name: {
firstNames: faker.name.firstName('female'),
familyName: faker.name.lastName('female')
firstNames: faker.person.firstName('female'),
familyName: faker.person.lastName('female')
},
birthDate: getRandomDate(20, 200),
nationality: 'Farajaland',
identifier: {
id: faker.random.numeric(10),
id: faker.string.numeric(10),
type: 'National ID'
},
address: {
Expand All @@ -52,13 +52,13 @@ test.describe.serial('8. Validate declaration review page', () => {
},
father: {
name: {
firstNames: faker.name.firstName('male'),
familyName: faker.name.lastName('male')
firstNames: faker.person.firstName('male'),
familyName: faker.person.lastName('male')
},
birthDate: getRandomDate(22, 200),
nationality: 'Farajaland',
identifier: {
id: faker.random.numeric(10),
id: faker.string.numeric(10),
type: 'National ID'
},
address: 'Same as mother'
Expand Down Expand Up @@ -422,8 +422,8 @@ test.describe.serial('8. Validate declaration review page', () => {
await page.locator('#child-content #Full').getByText('Change').click()

declaration.child.name = {
firstNames: faker.name.firstName('male'),
familyName: faker.name.lastName('male')
firstNames: faker.person.firstName('male'),
familyName: faker.person.lastName('male')
}
await page
.locator('#firstNamesEng')
Expand Down Expand Up @@ -612,8 +612,8 @@ test.describe.serial('8. Validate declaration review page', () => {
test("8.1.2.10 Change mother's name", async () => {
await page.locator('#mother-content #Full').getByText('Change').click()

declaration.mother.name.firstNames = faker.name.firstName('female')
declaration.mother.name.familyName = faker.name.lastName('female')
declaration.mother.name.firstNames = faker.person.firstName('female')
declaration.mother.name.familyName = faker.person.lastName('female')
await page
.locator('#firstNamesEng')
.fill(declaration.mother.name.firstNames)
Expand Down Expand Up @@ -695,7 +695,7 @@ test.describe.serial('8. Validate declaration review page', () => {

test("8.1.2.14 Change mother's ID", async () => {
await page.locator('#mother-content #ID').getByText('Change').click()
declaration.mother.identifier.id = faker.random.numeric(10)
declaration.mother.identifier.id = faker.string.numeric(10)
await page
.locator('#motherPassport')
.fill(declaration.mother.identifier.id)
Expand Down Expand Up @@ -738,8 +738,8 @@ test.describe.serial('8. Validate declaration review page', () => {
test("8.1.2.16 Change father's name", async () => {
await page.locator('#father-content #Full').getByText('Change').click()

declaration.father.name.firstNames = faker.name.firstName('male')
declaration.father.name.familyName = faker.name.lastName('male')
declaration.father.name.firstNames = faker.person.firstName('male')
declaration.father.name.familyName = faker.person.lastName('male')
await page
.locator('#firstNamesEng')
.fill(declaration.father.name.firstNames)
Expand Down Expand Up @@ -821,7 +821,7 @@ test.describe.serial('8. Validate declaration review page', () => {

test("8.1.2.20 Change father's ID", async () => {
await page.locator('#father-content #ID').getByText('Change').click()
declaration.father.identifier.id = faker.random.numeric(10)
declaration.father.identifier.id = faker.string.numeric(10)
await page
.locator('#fatherPassport')
.fill(declaration.father.identifier.id)
Expand Down Expand Up @@ -1349,7 +1349,7 @@ test.describe.serial('8. Validate declaration review page', () => {
])
})

const newFamilyNameForChild = faker.name.lastName('male')
const newFamilyNameForChild = faker.person.lastName('male')

test("8.3.2.1 Update child's family name", async () => {
await page
Expand Down
16 changes: 8 additions & 8 deletions e2e/testcases/birth/declarations/birth-declaration-1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
goToSection,
login
} from '../../../helpers'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { CREDENTIALS } from '../../../constants'

test.describe.serial('1. Birth declaration case - 1', () => {
Expand Down Expand Up @@ -41,19 +41,19 @@ test.describe.serial('1. Birth declaration case - 1', () => {
birthDate: getRandomDate(20, 200),
nationality: 'Farajaland',
identifier: {
id: faker.random.numeric(10),
id: faker.string.numeric(10),
type: 'National ID'
},
address: {
country: 'Farajaland',
province: 'Sulaka',
district: 'Irundu',
urbanOrRural: 'Urban',
town: faker.address.city(),
residentialArea: faker.address.county(),
street: faker.address.streetName(),
number: faker.address.buildingNumber(),
postcodeOrZip: faker.address.zipCode()
town: faker.location.city(),
residentialArea: faker.location.county(),
street: faker.location.street(),
number: faker.location.buildingNumber(),
postcodeOrZip: faker.location.zipCode()
},
maritalStatus: 'Single',
levelOfEducation: 'No schooling'
Expand All @@ -66,7 +66,7 @@ test.describe.serial('1. Birth declaration case - 1', () => {
birthDate: getRandomDate(22, 200),
nationality: 'Gabon',
identifier: {
id: faker.random.numeric(10),
id: faker.string.numeric(10),
type: 'National ID'
},
maritalStatus: 'Single',
Expand Down
4 changes: 2 additions & 2 deletions e2e/testcases/birth/declarations/birth-declaration-10.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
goToSection,
login
} from '../../../helpers'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { CREDENTIALS } from '../../../constants'

test.describe.serial('10. Birth declaration case - 10', () => {
Expand All @@ -18,7 +18,7 @@ test.describe.serial('10. Birth declaration case - 10', () => {
const declaration = {
child: {
name: {
firstNames: faker.name.lastName()
firstNames: faker.person.lastName()
}
},
informantType: 'Father',
Expand Down
40 changes: 20 additions & 20 deletions e2e/testcases/birth/declarations/birth-declaration-2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import {
joinValuesWith,
login
} from '../../../helpers'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { CREDENTIALS } from '../../../constants'

test.describe.serial('2. Birth declaration case - 2', () => {
let page: Page
const declaration = {
child: {
name: {
firstNames: faker.name.firstName('female'),
familyName: faker.name.lastName('female')
firstNames: faker.person.firstName('female'),
familyName: faker.person.lastName('female')
},
gender: 'Female',
birthDate: getRandomDate(0, 200)
Expand All @@ -35,44 +35,44 @@ test.describe.serial('2. Birth declaration case - 2', () => {
province: 'Pualula',
district: 'Funabuli',
urbanOrRural: 'Urban',
town: faker.address.city(),
residentialArea: faker.address.county(),
street: faker.address.streetName(),
number: faker.address.buildingNumber(),
postcodeOrZip: faker.address.zipCode()
town: faker.location.city(),
residentialArea: faker.location.county(),
street: faker.location.street(),
number: faker.location.buildingNumber(),
postcodeOrZip: faker.location.zipCode()
},
informantType: 'Father',
informantEmail: faker.internet.email(),
mother: {
name: {
firstNames: faker.name.firstName('female'),
familyName: faker.name.lastName('female')
firstNames: faker.person.firstName('female'),
familyName: faker.person.lastName('female')
},
age: 21,
nationality: 'Fiji',
identifier: {
id: faker.random.numeric(12),
id: faker.string.numeric(12),
type: 'Passport'
},
address: {
country: 'Farajaland',
province: 'Sulaka',
district: 'Irundu',
urbanOrRural: 'Rural',
village: faker.address.county()
village: faker.location.county()
},
maritalStatus: 'Married',
levelOfEducation: 'Primary'
},
father: {
name: {
firstNames: faker.name.firstName('male'),
familyName: faker.name.lastName('male')
firstNames: faker.person.firstName('male'),
familyName: faker.person.lastName('male')
},
age: 25,
nationality: 'Farajaland',
identifier: {
id: faker.random.numeric(8),
id: faker.string.numeric(8),
type: 'Passport'
},
maritalStatus: 'Married',
Expand All @@ -83,11 +83,11 @@ test.describe.serial('2. Birth declaration case - 2', () => {
province: 'Sulaka',
district: 'Zobwe',
urbanOrRural: 'Urban',
town: faker.address.city(),
residentialArea: faker.address.county(),
street: faker.address.streetName(),
number: faker.address.buildingNumber(),
postcodeOrZip: faker.address.zipCode()
town: faker.location.city(),
residentialArea: faker.location.county(),
street: faker.location.street(),
number: faker.location.buildingNumber(),
postcodeOrZip: faker.location.zipCode()
}
}
}
Expand Down
Loading

0 comments on commit 6749da9

Please sign in to comment.