Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 6953b28

Browse files
collect code coverage
1 parent 6b77d7d commit 6953b28

File tree

10 files changed

+199
-27
lines changed

10 files changed

+199
-27
lines changed

.devcontainer/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Devcontainers
2+
3+
Use [Devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) to prepare a fully automated working environment.
4+
5+
Generate the `devcontainer.json` executing:
6+
7+
```shell
8+
cd .devcontainer
9+
./generate_devcontainer.sh
10+
```
11+
12+
Now you should see the file `.devcontainer/devcontainer.json`. At this point you can use your favorite IDE to run Devcontainers
13+
14+
## VSCode
15+
16+
Install the extension https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
17+
18+
To open the repository with DevContainers do `Ctrl + Shift + P` and enter `Dev Containers: Rebuild and Reopen in Container`. For more options see the Extension documentations.
19+
20+
### Docker
21+
22+
Docker defaults should work fine therefore there is nothing to do.
23+
24+
### Podman
25+
26+
Start Podman service for a regular user (rootless) and make it listen to a socket:
27+
28+
```shell
29+
systemctl --user enable --now podman.socket
30+
```
31+
32+
Restart your OS if necessary and verify that podman listens:
33+
34+
```shell
35+
systemctl --user status podman.socket
36+
```
37+
38+
Go to the Extension Settings:
39+
40+
- `Dev › Containers: Docker Compose Path` set `podman-compose`
41+
- `Dev › Containers: Docker Path` set `podman`
42+
- `Dev › Containers: Docker Socket Path` set `/run/podman/podman.sock`

.devcontainer/template.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "trustify-ui-tests",
2+
"name": "trustify-tests",
33
"build": {
44
"dockerfile": "Dockerfile"
55
},
@@ -25,20 +25,12 @@
2525
"label": "real vnc"
2626
}
2727
},
28-
"onCreateCommand": "npx playwright install-deps && npx playwright install",
29-
"postCreateCommand": "npm ci",
3028
"customizations": {
3129
"vscode": {
3230
"extensions": [
33-
"k--kato.intellij-idea-keybindings",
34-
"vadimcn.vscode-lldb",
3531
"ms-playwright.playwright",
3632
"alexkrechik.cucumberautocomplete",
37-
"github.vscode-pull-request-github",
38-
"GitHub.github-vscode-theme",
39-
"esbenp.prettier-vscode",
40-
"oderwat.indent-rainbow",
41-
"eamodio.gitlens"
33+
"esbenp.prettier-vscode"
4234
]
4335
}
4436
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ node_modules/
88

99
.devcontainer/devcontainer.json
1010
.features-gen/
11+
/.nyc_output/

package-lock.json

Lines changed: 34 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"author": "",
1919
"license": "ISC",
2020
"devDependencies": {
21-
"axios": "^1.8.2",
2221
"@hey-api/client-axios": "^0.6.2",
2322
"@hey-api/openapi-ts": "^0.64.10",
24-
"@types/node": "^22.0.2",
23+
"@types/node": "^22.16.5",
24+
"axios": "^1.8.2",
2525
"playwright-bdd": "^8.0.1",
2626
"prettier": "^3.3.3"
2727
}

playwright.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { defineBddConfig } from "playwright-bdd";
33

44
const testDir = defineBddConfig({
55
features: ["tests/**/features/@*/*.feature"],
6-
steps: ["tests/**/features/**/*.step.ts", "tests/**/steps/**/*.ts"],
6+
steps: [
7+
"tests/**/features/**/*.step.ts",
8+
"tests/**/steps/**/*.ts",
9+
"tests/ui/fixtures.ts",
10+
],
711
});
812

913
/**

tests/ui/features/@sbom-explorer/sbom-explorer.step.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { expect } from "playwright/test";
33
import { DetailsPage } from "../../helpers/DetailsPage";
44
import { ToolbarTable } from "../../helpers/ToolbarTable";
55
import { SearchPage } from "../../helpers/SearchPage";
6+
import { test } from "../../fixtures";
67

7-
export const { Given, When, Then } = createBdd();
8+
export const { Given, When, Then } = createBdd(test);
89

910
const PACKAGE_TABLE_NAME = "Package table";
1011
const VULN_TABLE_NAME = "Vulnerability table";

tests/ui/features/@vulnerability-explorer/vulnerability-explorer.step.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { createBdd } from "playwright-bdd";
22
import { ToolbarTable } from "../../helpers/ToolbarTable";
33
import { SearchPage } from "../../helpers/SearchPage";
44
import { expect } from "@playwright/test";
5+
import { test } from "../../fixtures";
56

6-
export const { Given, When, Then } = createBdd();
7+
export const { Given, When, Then } = createBdd(test);
78

89
const SBOM_TABLE_NAME = "Sbom table";
910
const ADVISORY_TABLE_NAME = "Advisory table";

0 commit comments

Comments
 (0)