update tests for CI/CD

This commit is contained in:
2025-10-19 19:46:30 -05:00
committed by Jason Ross
parent efcda562c2
commit f666694f9b
6 changed files with 15 additions and 12 deletions
+2 -6
View File
@@ -48,9 +48,7 @@ jobs:
cache: 'pnpm' cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: | run: pnpm install --frozen-lockfile
pnpm install --frozen-lockfile
cd job-application-demo && pnpm install --frozen-lockfile
- name: Run demo unit tests - name: Run demo unit tests
run: cd job-application-demo && pnpm test -- --run --reporter=verbose run: cd job-application-demo && pnpm test -- --run --reporter=verbose
@@ -74,9 +72,7 @@ jobs:
cache: 'pnpm' cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: | run: pnpm install --frozen-lockfile
pnpm install --frozen-lockfile
cd job-application-demo && pnpm install --frozen-lockfile
- name: Install Playwright browsers - name: Install Playwright browsers
run: cd job-application-demo && npx playwright install --with-deps chromium firefox run: cd job-application-demo && npx playwright install --with-deps chromium firefox
+3 -4
View File
@@ -77,7 +77,7 @@ describe('App', () => {
await waitFor(() => { await waitFor(() => {
expect( expect(
screen.getByText(/please fill in all required personal information/i) screen.getByText(/please fill in all required personal information fields/i)
).toBeInTheDocument(); ).toBeInTheDocument();
}); });
}); });
@@ -147,9 +147,8 @@ describe('App', () => {
await user.click(submitButton); await user.click(submitButton);
await waitFor(() => { await waitFor(() => {
expect( const alert = screen.getByRole('alert');
screen.getByText(/please add at least one skill/i) expect(alert).toHaveTextContent(/please add at least one skill/i);
).toBeInTheDocument();
}); });
}); });
+1 -1
View File
@@ -139,7 +139,7 @@ function App() {
Fields marked with * are required Fields marked with * are required
</Typography> </Typography>
<Box component="form" onSubmit={handleSubmit}> <Box component="form" onSubmit={handleSubmit} noValidate>
<PersonalInfoForm <PersonalInfoForm
data={formData.personalInfo} data={formData.personalInfo}
onChange={(personalInfo) => onChange={(personalInfo) =>
+1 -1
View File
@@ -1,4 +1,4 @@
import { defineConfig } from 'vite'; import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
// https://vite.dev/config/ // https://vite.dev/config/
+3
View File
@@ -1,2 +1,5 @@
packages:
- 'job-application-demo'
onlyBuiltDependencies: onlyBuiltDependencies:
- esbuild - esbuild
+5
View File
@@ -8,6 +8,11 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: 'jsdom', environment: 'jsdom',
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/job-application-demo/**',
],
}, },
resolve: { resolve: {
alias: { alias: {