Skip to content

Commit

Permalink
fix: resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhyen99 committed Oct 29, 2024
2 parents d7be79a + ee48260 commit c8bd71b
Show file tree
Hide file tree
Showing 106 changed files with 32,873 additions and 1,648 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ jobs:
- name: Check linting
run: yarn lint

- name: Build
run: yarn build

- name: Run tests
run: |
yarn jest --changedSince=origin/next --ci --json --coverage --testLocationInResults --outputFile=report.json
yarn test:coverage
- name: Coverage
uses: artiomtr/jest-coverage-report-action@v2
- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-file: report.json
base-coverage-file: report.json
threshold: 80

- name: Build
run: yarn build
title: Code Coverage Report
multiple-files: |
All packages, ./coverage/coverage-summary.json
Components, ./packages/components/coverage/coverage-summary.json
Mock app, ./packages/mock-app/coverage/coverage-summary.json
Services, ./packages/services/coverage/coverage-summary.json
UNTP test suite, ./packages/untp-test-suite/coverage/coverage-summary.json
VC test suite, ./packages/vc-test-suite/coverage/coverage-summary.json
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ tmp/
# logs
/logs
packages/services/tsconfig.tsbuildinfo
packages/mock-app/src/constants/app-config.json
packages/untp-test-suite/credentials.json
packages/untp-test-suite/data
# vc-test-suite
Expand Down
104 changes: 88 additions & 16 deletions app-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
"parameters": [
{
"storageKey": "CherriesFarm_dpps",
"objectKeyPath": "/vc/credentialSubject/productIdentifier/0/identifierValue"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue"
}
]
}
Expand Down Expand Up @@ -4604,11 +4604,11 @@
"constructData": {
"mappingFields": [
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/eventID"
},
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/epcList/index/name"
},
{
Expand Down Expand Up @@ -4748,7 +4748,76 @@
"parameters": [
{
"storageKey": "orchard_facility_transaction_event",
"objectKeyPath": "/vc/credentialSubject/eventID"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/eventID"
}
]
}
]
},
{
"name": "Import Credential (QR)",
"id": "import_credential_qr",
"components": [
{
"name": "QRCodeScannerDialogButton",
"type": "EntryData",
"props": {
"style": { "margin": "40px auto", "paddingTop": "40px", "width": "80%" },
"vcOptions": {
"vckitAPIUrl": "http://localhost:3332/agent/routeVerificationCredential",
"headers": {
"Authorization": "Bearer test123"
}
}
}
},
{
"name": "CustomButton",
"type": "Submit",
"props": {}
}
],
"services": [
{
"name": "mergeToLocalStorage",
"parameters": [
{
"storageKey": "CherriesFarm_qr_credential"
}
]
}
]
},
{
"name": "Import Credential (JSON)",
"id": "import_credential_json",
"components": [
{
"name": "ImportButton",
"type": "EntryData",
"props": {
"label": "Import JSON",
"style": { "margin": "40px auto", "paddingTop": "40px", "width": "80%" },
"vcOptions": {
"vckitAPIUrl": "http://localhost:3332/agent/routeVerificationCredential",
"headers": {
"Authorization": "Bearer test123"
}
}
}
},
{
"name": "CustomButton",
"type": "Submit",
"props": {}
}
],
"services": [
{
"name": "mergeToLocalStorage",
"parameters": [
{
"storageKey": "CherriesFarm_json_credential"
}
]
}
Expand Down Expand Up @@ -5502,7 +5571,7 @@
"parameters": [
{
"storageKey": "CherriesFarm_dpps",
"objectKeyPath": "/vc/credentialSubject/productIdentifier/0/identifierValue"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue"
}
]
}
Expand Down Expand Up @@ -5845,11 +5914,11 @@
"constructData": {
"mappingFields": [
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/eventID"
},
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/epcList/index/name"
},
{
Expand Down Expand Up @@ -5989,7 +6058,7 @@
"parameters": [
{
"storageKey": "packhouse_facility_transaction_event",
"objectKeyPath": "/vc/credentialSubject/eventID"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/eventID"
}
]
}
Expand Down Expand Up @@ -6743,7 +6812,7 @@
"parameters": [
{
"storageKey": "CherriesFarm_dpps",
"objectKeyPath": "/vc/credentialSubject/productIdentifier/0/identifierValue"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue"
}
]
}
Expand Down Expand Up @@ -7086,11 +7155,11 @@
"constructData": {
"mappingFields": [
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/eventID"
},
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/epcList/index/name"
},
{
Expand Down Expand Up @@ -7230,7 +7299,7 @@
"parameters": [
{
"storageKey": "fumigation_and_freight_forwarding_facility_transaction_event",
"objectKeyPath": "/vc/credentialSubject/eventID"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/eventID"
}
]
}
Expand Down Expand Up @@ -7984,7 +8053,7 @@
"parameters": [
{
"storageKey": "CherriesFarm_dpps",
"objectKeyPath": "/vc/credentialSubject/productIdentifier/0/identifierValue"
"objectKeyPath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue"
}
]
}
Expand Down Expand Up @@ -8327,11 +8396,11 @@
"constructData": {
"mappingFields": [
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/eventID"
},
{
"sourcePath": "/vc/credentialSubject/productIdentifier/0/identifierValue",
"sourcePath": "/decodedEnvelopedVC/credentialSubject/productIdentifier/0/identifierValue",
"destinationPath": "/epcList/index/name"
},
{
Expand Down Expand Up @@ -8482,6 +8551,9 @@
"type": "application/json",
"href": "http://localhost:3332/agent/routeVerificationCredential",
"hreflang": ["en"],
"apiKey": "test123"
"headers": {
"Authorization": "Bearer test123",
"Content-Type": "application/json"
}
}
}
18 changes: 14 additions & 4 deletions documentation/docs/mock-apps/components/import-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ The ImportButton component is responsible for rendering a button that allows the

### Props

| Property | Required | Description | Type |
| -------- | -------- | ------------------------------- | ------ |
| label | Yes | The label for the import button | String |
| style | No | The style for the component | Object |
| Property | Required | Description | Type |
| --------- | -------- | ----------------------------------------------------------------------------------------------------- | ------ |
| label | Yes | The label for the import button | String |
| style | No | The style for the component | Object |
| type | No | The type of data (should be 'VerifiableCredential' and 'JSON'), the default is 'VerifiableCredential' | String |
| vcOptions | No | The options for the VC data processing | Object |

#### vcOptions

| Property | Required | Description | Type |
| -------------- | -------- | -------------------------------------------------------------------------- | ------ |
| credentialPath | Yes | The path for the credential data | String |
| vckitAPIUrl | No | The URL for the vckit API | String |
| headers | No | The headers for the vckit API, example: { Authorization: "Bearer test123"} | Object |
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ The QRCodeScannerDialogButton component is responsible for rendering a button th

### Props

| Property | Required | Description | Type |
| -------- | -------- | --------------------------- | ------ |
| style | No | The style for the component | Object |
| Property | Required | Description | Type |
| --------- | -------- | ----------------------------------------------------------------------------------------------------- | ------ |
| style | No | The style for the component | Object |
| type | No | The type of data (should be 'VerifiableCredential' and 'JSON'), the default is 'VerifiableCredential' | String |
| vcOptions | No | The options for the VC data processing | Object |

#### vcOptions

| Property | Required | Description | Type |
| -------------- | -------- | -------------------------------------------------------------------------- | ------ |
| credentialPath | Yes | The path for the credential data that is fetched from the QR code URL | String |
| vckitAPIUrl | No | The URL for the vckit API | String |
| headers | No | The headers for the vckit API, example: { Authorization: "Bearer test123"} | Object |
Loading

0 comments on commit c8bd71b

Please sign in to comment.