Skip to content

Commit 4f521cb

Browse files
Adds devcontainer
1 parent a4dec67 commit 4f521cb

5 files changed

Lines changed: 38 additions & 36 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mcr.microsoft.com/playwright:v1.50.0-noble
2+
RUN apt-get update && apt-get install -y wget apt-transport-https gnupg\
3+
&& wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -\
4+
&& echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list\
5+
&& apt-get update && apt-get install -y temurin-21-jdk

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Online Shop",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"features": {
7+
"ghcr.io/devcontainers/features/java:1": {
8+
"version": "none",
9+
"installMaven": "true",
10+
"mavenVersion": "3.8.6",
11+
"installGradle": "false"
12+
},
13+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
14+
"dockerDashComposeVersion": "v2"
15+
}
16+
},
17+
"postCreateCommand": "cd customer-client && npm ci && npx playwright install --with-deps chromium",
18+
"postStartCommand": "docker compose up --build && cd customer-client && npm run test:ui:codespaces",
19+
"customizations": {
20+
"vscode": {
21+
"settings": {},
22+
"extensions": [
23+
"streetsidesoftware.code-spell-checker",
24+
"ms-playwright.playwright"
25+
]
26+
}
27+
},
28+
"forwardPorts": [3000, 3030, 4040, 5050, 5432, 6060, 7070, 8181, 8832]
29+
}

.devcontainers/devcontainer.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!.gitignore
44
!.github
55
!.gitattributes
6+
!.devcontainer/
67
/keycloak/*
78
target/
89
*.iml

customer-client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"format:check": "prettier --check .",
1212
"preview": "vite preview",
1313
"test": "playwright test",
14-
"test:ui": "playwright test --ui"
14+
"test:ui": "playwright test --ui",
15+
"test:ui:codespaces": "playwright test --ui --ui-host=0.0.0.0 --ui-port=8832",
16+
"test:wiremock": "playwright test --config=playwright.wiremock.config.ts"
1517
},
1618
"dependencies": {
1719
"@tanstack/react-form": "^1.28.0",

0 commit comments

Comments
 (0)