Skip to content

Commit

Permalink
Added table of contents, overview section and 'How to run' section
Browse files Browse the repository at this point in the history
  • Loading branch information
vafeini committed Jul 3, 2024
1 parent c13909b commit ebbe503
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ the [EUDI Wallet Reference Implementation project description](https://github.co

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.5.
## Table of contents

* [Overview](#overview)
* [Development server](#development-server)
* [Code scaffolding](#code-scaffolding)
* [Build](#build)
* [How to run](#how-to-run)
* [Running tests](#running-tests)
* [License](#license)

## Overview

This is a WEB UI that provides functionality to interact with the Verifier/RP trusted end-point implemented [here](https://github.com/eu-digital-identity-wallet/eudi-srv-web-verifier-endpoint-23220-4-kt).
The project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.5.

## Development server

Expand All @@ -19,15 +32,26 @@ Run `ng generate component component-name` to generate a new component. You can

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests
## How to run

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
You need npm (node version 18.15.0) and [Angular CLI](https://github.com/angular/angular-cli) installed on your machine.

## Running end-to-end tests
In order to run Verifier UI run the following commands:

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
```
npm install
ng start
```
The above command utilizes [proxy.conf.json](src/proxy.conf.json) that proxies the calls to the expected verifier backend service.
Update this file if you want your Verifier UI to point to a locally running verifier backend service.

## Further help
You can access the application at [http://localhost:4200](http://localhost:4200)

## Running tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/mso-mdoc-presentation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {uuidv4} from "@core/utils/uuid";
export class MsoMdocPresentationService {

fieldConstraint(document: MsoMdoc, attribute: string, intentToRetainOptional?: boolean): FieldConstraint {
var intentToRetain = false
let intentToRetain = false;
if (typeof intentToRetainOptional !== 'undefined' && intentToRetainOptional) {
intentToRetain = true
}
Expand All @@ -21,7 +21,7 @@ export class MsoMdocPresentationService {
}

fieldConstraints(document: MsoMdoc, includeAttributes?: string[]): FieldConstraint[] {
var fieldConstraints: FieldConstraint[] = []
const fieldConstraints: FieldConstraint[] = [];
document.attributes.forEach((attribute: Attribute) => {
if (typeof includeAttributes == 'undefined' || includeAttributes.includes(attribute.value)) {
fieldConstraints.push(this.fieldConstraint(document, attribute.value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class SelectablePresentationFormComponent implements OnInit {

initPresentationModel() {
this.attestationModel = this.attestationSelectableModelService.getModel();
var presentationPurpose = this.attestationSelectableModelService.getPresentationPurpose();
const presentationPurpose = this.attestationSelectableModelService.getPresentationPurpose();
this.draftPresentation = this.msoMdocPresentationService.presentationOf(this.attestationModel, presentationPurpose, [])
}

Expand Down

0 comments on commit ebbe503

Please sign in to comment.