Minimal testid additions to 4 renderer files so Playwright can target
stable selectors: table-renderer, cell-{rowId}-{fieldName}, kanban-board,
kanban-column-{label}, kanban-card-{rowId}, calendar-renderer,
inline-editor-input, inline-editor-readonly.
Also adds Dockerfile.e2e for the client build used in docker-compose.e2e.yml.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
# Dockerfile.e2e — DocAdenice client for e2e stack.
|
|
#
|
|
# Builds the Vite app and serves it via a lightweight static server.
|
|
# Used only in docker-compose.e2e.yml — not for production.
|
|
|
|
FROM node:22-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy workspace root (monorepo — client may depend on shared packages).
|
|
COPY package*.json ./
|
|
COPY apps/client/package*.json ./apps/client/
|
|
|
|
# Install deps.
|
|
RUN npm ci --workspace=apps/client 2>/dev/null || \
|
|
(cd apps/client && npm ci)
|
|
|
|
COPY . .
|
|
|
|
# Build with e2e environment placeholders.
|
|
# VITE_ vars must be set at build time (Vite inlines them).
|
|
# In CI they are overridden via docker-compose env: section.
|
|
ARG VITE_APP_URL=http://localhost:3001
|
|
ARG VITE_BRIDGE_URL=http://localhost:4001
|
|
|
|
ENV VITE_APP_URL=${VITE_APP_URL}
|
|
ENV VITE_BRIDGE_URL=${VITE_BRIDGE_URL}
|
|
|
|
RUN cd apps/client && npm run build
|
|
|
|
# --- Serve stage ---
|
|
FROM node:22-alpine AS serve
|
|
|
|
WORKDIR /app
|
|
|
|
# Use serve package to host the built assets.
|
|
RUN npm install -g serve@14
|
|
|
|
COPY --from=build /app/apps/client/dist ./dist
|
|
|
|
# serve on port 5173 to match Vite dev server default.
|
|
EXPOSE 5173
|
|
|
|
CMD ["serve", "-s", "dist", "-l", "5173"]
|