update tests for CI/CD
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
// https://vite.dev/config/
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
packages:
|
||||
- 'job-application-demo'
|
||||
|
||||
onlyBuiltDependencies:
|
||||
- esbuild
|
||||
|
||||
@@ -8,6 +8,11 @@ export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
exclude: [
|
||||
'**/node_modules/**',
|
||||
'**/dist/**',
|
||||
'**/job-application-demo/**',
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user