The Orchestral project focus on developing the IdHub service, which facilitates organisations (acting as issuers or verifiers) and beneficiaries (acting as
subjects and credential holders) to issue, exchange, and verify data in the form of
verifiable credentials for credible and flexible access to benefits or services.
The Administration module enables administrators to manage users and roles, handle
aspects such as the creation of organisational Decentralized Identifiers (DIDs),
management of credentials issued by the organisation, and upload the information for
the issuance of credentials to users (including credential schemes and data).
Conversely, the User module equips users to manage their personal information, create
an identity (DID), request the issuance of a credential, and present these credentials to entities within our user community. This module operates as a ‘user wallet’.
The application's backend is responsible for issuing credentials upon user request
through the user module. Meanwhile, the idHub can function as a credential verifier
and engage in dialogues with other idHub instances that operate as user wallets by
implementing the OIDC4VP protocol that we have developed. Consequently, the
IdHub is multifaceted, capable of functioning as an issuer, wallet or verifier.
The data used in our tests is pre-configurated or generated dynamically during the execution of the tests and is purely fictitious. This approach allows us to create a controlled testing environment isolated from real-world data, ensuring the integrity and reliability of ourtests.
The testing to be executed is grounded in the acceptance criteria defined within the
user stories during the requirements phase. These criteria are designed to match
specific user stories, providing clear, straightforward requirements that must be met
for the final product.
## Getting Started
### Prerequisites
To get started with the IdHub testing project, you need to have the following prerequisites installed on your system:
- **Node.js**: Ensure you have Node.js version 14 or later installed. You can check your version by running `node -v` in your terminal. If you need to install or update Node.js, visit the [official Node.js website](https://nodejs.org/).
- **TypeScript**: The project is written in TypeScript. You should have TypeScript version 4.0 or later. You can install it globally using npm by running `npm install -g typescript`.
- **Playwright**: Playwright is the tool used for end-to-end testing. You can install it by running `npm install playwright`.
- **Installation**: Step-by-step instructions on how to clone the repository and install dependencies.
### Installation
To clone the repository and install the project dependencies, follow these steps:
1. Open your terminal or command prompt.
2. Navigate to the directory where you want to clone the project.
3. Run `git clone https://github.com/idHub_testing.git` to clone the repository.
4. Navigate into the project directory using `cd idHub_testing`.
5. Install the project dependencies:
- Installing global dependencies: `npm install -g playwright`
- Installing project dependencies: `npm install`
- Setting up environment variables: [TODO]
## Usage
### Running Tests
To run the tests, navigate to the project directory in your terminal and execute the following command:
```bash
npm test
```
This command runs the test suite using Playwright, executing all tests defined in the project.
### Writing Tests: When writing new tests, it's important to follow the established test structure. Here's a brief guide:
- **Test Files**: Place your test files in the `tests` directory, following the naming convention `test-name.spec.ts`.
- **Page Objects**: Use the Page Object Model (POM) pattern for organizing your tests. Each page in your application should have a corresponding Page Object file, e.g., `COMM_loginPage.ts`, `AD_ViewUsersPage.ts`, `US_ViewMyCredentialsPage.ts` (prefix 'AD_' for a page in the admin interface, prefix 'US_' for a page in the user interface, prefix 'COMM_' for common pages). The page objects are stored in the directory `src/page-objects`.
- **Step Definitions**: Define reusable steps within the `steps.ts` This helps in maintaining the tests and promotes code reuse. The `steps.ts` is stored in the `src` directory.
An example of a simple test might look like this:
```typescript
test('Successful login as user', async ({ page }) => {
The 'loginAs<User>' function in `steps.ts` use the 'LoginPage' page object, where are defined all the user related actions (e.g., visit, login, etc.).
## Project Directory Structure
### src directory
- **constants directory:**: Describe....
- **data_stores directory**: Describe...
- **interfaces directory**: Describe
- **page-objects directory**: Describe
- **steps.ts**: Describe
- **utils.ts**: Describe
### tests directory
The tests directory is where all test files are stored. These test files contain the actual tests that Playwright will execute to validate the functionality of the application. The configuration for the tests directory and other related settings are defined in the Playwright configuration file, typically named playwright.config.ts.
### vc_excel directory
describe
## License
[Include information about the project's license.]