Modify README.md
This commit is contained in:
parent
4a52f28cff
commit
27c18b5c0a
31
README.md
31
README.md
|
@ -28,12 +28,10 @@ implementing the OIDC4VP protocol that we have developed. Consequently, the
|
|||
IdHub is multifaceted, capable of functioning as an issuer, wallet or verifier.
|
||||
|
||||
|
||||
Playwright is designed for automating browser interactions, making it ideal for end-to-end testing.
|
||||
We use Playwright for automating browser interactions for end-to-end testing.
|
||||
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.
|
||||
The testing to be executed is grounded in the acceptance criteria defined within the
|
||||
user stories during the requirements phase.
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
@ -51,9 +49,9 @@ To clone the repository and install the project dependencies, follow these steps
|
|||
2. Navigate to the directory where you want to clone the project.
|
||||
3. Run `git clone https://gitea.pangea.org/trustchain-oc1-orchestral/IdHub_E2E_testing.git` to clone the repository.
|
||||
4. Navigate into the project directory using `cd idHub_testing`.
|
||||
5. Installing playwright using `npm install -g playwright`
|
||||
- Installing project dependencies: `npm install`
|
||||
- Setting up environment variables: [TODO]
|
||||
5. Install playwright using `npm install -g playwright`
|
||||
- Install project dependencies: `npm install`
|
||||
- Set up environment variables: [TODO]
|
||||
|
||||
|
||||
## Usage
|
||||
|
@ -67,7 +65,10 @@ npx playwright 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:
|
||||
In the `playwright-report/` directory there is an index.html file with the result of all test done.
|
||||
|
||||
### 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, The page objects are stored in the directory `src/page-objects`.
|
||||
|
@ -116,6 +117,8 @@ The 'loginAs<User>' function in `steps.ts` use the 'LoginPage' page object, wher
|
|||
|
||||
The **constants.ts** file defines a collection of constants used for various purposes within a project, including file paths, JSON schema names and URLs, Excel file names for testing, schema names and types as they appear in the Idhub Admin interface, user alert messages, status types, and membership types. These constants are likely used across the project for consistent references to file paths, schema identifiers, and other configuration details, ensuring that changes to these values only need to be made in one place.
|
||||
|
||||
The **env_constants.ts** file defines environmental variables related to the specific instances used in the tests.
|
||||
|
||||
The **credentials_fields.ts** file is designed to store and manage constant values related to the fields or properties of the diferent types of credentials defined in the pilots.
|
||||
|
||||
### src/data_stores directory
|
||||
|
@ -173,15 +176,5 @@ end2end-tests:
|
|||
|
||||
```
|
||||
|
||||
**Adding reporting**: Uploads the `playwright-report/` directory as an artifact named `playwright-report`. This step always runs, even if previous steps fail, and the artifact is retained for 30 days before automatic deletion.
|
||||
```yaml
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -44,13 +44,7 @@ export class LogInPage {
|
|||
async errorMessageIsValid() {
|
||||
|
||||
try {
|
||||
|
||||
try {
|
||||
await this.page.locator('.well.well-small.text-error').waitFor({ state: 'visible', timeout: 5000 });
|
||||
} catch (error) {
|
||||
console.error('Error message not found:', error);
|
||||
return false; // Return false if the error message is not found
|
||||
}
|
||||
await this.page.locator('.well.well-small.text-error').waitFor({ state: 'visible', timeout: 5000 });
|
||||
// If the error message is found and visible, retrieve its text content
|
||||
const errorText = await this.page.locator('.well.well-small.text-error').textContent();
|
||||
|
||||
|
|
Reference in a new issue