fix(ci): run only server tests in Docker tester stage
Some checks failed
Build & Push Docker Image / test-and-build (push) Failing after 38s
Some checks failed
Build & Push Docker Image / test-and-build (push) Failing after 38s
Playwright Chromium is not available in node:24-alpine, causing the vitest 'client' project (browser tests) to fail with an unhandled browserType.launch error and exit code 1. - Dockerfile: switch tester stage command to 'npm run test:unit -- --run --project=server' so only Node.js unit tests run during Docker builds - page.svelte.spec.ts: update stale 'renders h1' assertion to match the new InstaChef design (no h1; check for 'InstaChef' logo text) Browser component tests still run locally when Playwright/Chromium is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,9 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm test
|
||||
# Run only server-side unit tests; browser (Playwright) tests require a full
|
||||
# Chromium environment that is not available in the Alpine build stage.
|
||||
RUN npm run test:unit -- --run --project=server
|
||||
|
||||
# ── stage: builder ───────────────────────────────────────────────────────────
|
||||
FROM node:24-alpine AS builder
|
||||
|
||||
@@ -4,10 +4,11 @@ import { render } from 'vitest-browser-svelte';
|
||||
import Page from './+page.svelte';
|
||||
|
||||
describe('/+page.svelte', () => {
|
||||
it('should render h1', async () => {
|
||||
it('should render the InstaChef app shell', async () => {
|
||||
render(Page);
|
||||
|
||||
const heading = page.getByRole('heading', { level: 1 });
|
||||
await expect.element(heading).toBeInTheDocument();
|
||||
// The app logo text is the primary visible brand element in the TopBar
|
||||
const logo = page.getByText('InstaChef');
|
||||
await expect.element(logo).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user