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'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
cd job-application-demo && pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run demo unit tests
run: cd job-application-demo && pnpm test -- --run --reporter=verbose
@@ -74,9 +72,7 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
cd job-application-demo && pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
run: cd job-application-demo && npx playwright install --with-deps chromium firefox
+3 -4
View File
@@ -77,7 +77,7 @@ describe('App', () => {
await waitFor(() => {
expect(
screen.getByText(/please fill in all required personal information/i)
screen.getByText(/please fill in all required personal information fields/i)
).toBeInTheDocument();
});
});
@@ -147,9 +147,8 @@ describe('App', () => {
await user.click(submitButton);
await waitFor(() => {
expect(
screen.getByText(/please add at least one skill/i)
).toBeInTheDocument();
const alert = screen.getByRole('alert');
expect(alert).toHaveTextContent(/please add at least one skill/i);
});
});
+1 -1
View File
@@ -139,7 +139,7 @@ function App() {
Fields marked with * are required
</Typography>
<Box component="form" onSubmit={handleSubmit}>
<Box component="form" onSubmit={handleSubmit} noValidate>
<PersonalInfoForm
data={formData.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';
// https://vite.dev/config/
+3
View File
@@ -1,2 +1,5 @@
packages:
- 'job-application-demo'
onlyBuiltDependencies:
- esbuild
+5
View File
@@ -8,6 +8,11 @@ export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/job-application-demo/**',
],
},
resolve: {
alias: {