From a8657639decc6573ed9a2dc1c043d54412c18c84 Mon Sep 17 00:00:00 2001 From: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com> Date: Tue, 10 Jun 2025 13:18:06 +0200 Subject: [PATCH 1/2] Add Devcontainer README.md Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com> --- .devcontainer/README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .devcontainer/README.md diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..7ba7b48 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,41 @@ +# Devcontainers + +Use [Devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) to prepare a fully automated working environment. + +Generate the `devcontainer.json` executing: + +```shell +.devcontainer/generate_devcontainer.sh +``` + +Now you should see the file `.devcontainer/devcontainer.json`. At this point you can use your favorite IDE to run Devcontainers + +## VSCode + +Install the extension https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers + +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. + +### Docker + +Docker defaults should work fine therefore there is nothing to do. + +### Podman + +Start Podman service for a regular user (rootless) and make it listen to a socket: + +```shell +systemctl --user enable --now podman.socket +``` + +Restart your OS if necessary and verify that podman listens: + +```shell +systemctl --user status podman.socket +``` + +Go to the Extension Settings: + +- `Dev › Containers: Docker Compose Path` set `podman-compose` +- `Dev › Containers: Docker Path` set `podman` +- `Dev › Containers: Docker Socket Path` set `/run/podman/podman.sock` \ No newline at end of file From 4828b86946b81ecc9547c5acb9a5aad7f2247fe7 Mon Sep 17 00:00:00 2001 From: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:35:24 +0200 Subject: [PATCH 2/2] add enhancements to devcontainers Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com> --- .devcontainer/README.md | 3 ++- .devcontainer/template.json | 12 ++---------- tests/ui/helpers/Auth.ts | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 7ba7b48..525f81c 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -5,7 +5,8 @@ Use [Devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) Generate the `devcontainer.json` executing: ```shell -.devcontainer/generate_devcontainer.sh +cd .devcontainer +./generate_devcontainer.sh ``` Now you should see the file `.devcontainer/devcontainer.json`. At this point you can use your favorite IDE to run Devcontainers diff --git a/.devcontainer/template.json b/.devcontainer/template.json index df71976..5b747e9 100644 --- a/.devcontainer/template.json +++ b/.devcontainer/template.json @@ -1,5 +1,5 @@ { - "name": "trustify-ui-tests", + "name": "trustify-tests", "build": { "dockerfile": "Dockerfile" }, @@ -25,20 +25,12 @@ "label": "real vnc" } }, - "onCreateCommand": "npx playwright install-deps && npx playwright install", - "postCreateCommand": "npm ci", "customizations": { "vscode": { "extensions": [ - "k--kato.intellij-idea-keybindings", - "vadimcn.vscode-lldb", "ms-playwright.playwright", "alexkrechik.cucumberautocomplete", - "github.vscode-pull-request-github", - "GitHub.github-vscode-theme", - "esbenp.prettier-vscode", - "oderwat.indent-rainbow", - "eamodio.gitlens" + "esbenp.prettier-vscode" ] } } diff --git a/tests/ui/helpers/Auth.ts b/tests/ui/helpers/Auth.ts index 6d839be..1ccfe43 100644 --- a/tests/ui/helpers/Auth.ts +++ b/tests/ui/helpers/Auth.ts @@ -13,6 +13,6 @@ export const login = async (page: Page) => { await page.fill('input[name="password"]:visible', userPassword); await page.keyboard.press("Enter"); - await page.waitForSelector("text=Your Dashboard"); // Ensure login was successful + await page.waitForSelector("text=Dashboard"); // Ensure login was successful } };