Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme update testing #307

Merged
merged 4 commits into from
Feb 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,32 @@ between your host or guest machine.

> If you decide to use your guest machine, just ssh into it, go to the synced folder:
>
> ```
> ```bash
> $ vagrant ssh
> $ cd /usr/src/freeipa-webui/
> ```

Now you can install the project's dependencies:

```
```bash
$ npm install
```

To build (and watch the project for changes), run:

```
```bash
$ npm run start
```

You can serve the project using the following command:

```
```bash
$ npm run serve
```

You can also build and serve the project for production using the following command:

```
```bash
$ npm run build
```

Expand All @@ -94,9 +94,51 @@ The default credentials are **admin** and **Secret123**.

## Testing

TBD
### Integration tests

Integration testing uses [Cypress](https://www.cypress.io) library, which runs [Gherkin-defined](https://cucumber.io/docs/gherkin) steps.

#### Launching the existing tests

> [!WARNING]
> Never run integration tests on production server. Clean-up step would delete all existing entries, e.g. users.

1. Prepare a vagrant server as in `Development Environment`
2. if you want to launch all the tests in headless mode, execute

```bash
$ npm run cypress
```

if you want to open graphical debugger, execute

```bash
$ npm run cypress:open
```

and select desired feature file you want to execute.

#### Adding new tests

The integration tests use the **.feature** suffix and can be found in the _tests_ subfolder, together with the steps describing each feature.

### Unit tests

Unit tests use [jest](https://jestjs.io).

#### Launching the existing tests

The existing tests can be launched by executing

```bash
$ npm run test
```

#### Adding new tests

The unit tests live, where the component that is being tested lives, the name should be the same, only with the **.test.tsx** suffix instead.

- [audit-ci](https://github.com/IBM/audit-ci)
If you require FreeIPA to be running, please use integration tests instead.

## License

Expand Down
Loading