Skip to content

Commit 318a83b

Browse files
committed
Remove leftover playwright-report directory
1 parent 2b457cd commit 318a83b

File tree

4 files changed

+6
-156
lines changed

4 files changed

+6
-156
lines changed

.github/workflows/frontend.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
node-version-file: 'frontend/package.json'
2626
cache: npm
27-
cache-dependency-path: frontend/package-lock.json
27+
cache-dependency-path: frontend/package.json
2828
- name: Install Dependencies
2929
working-directory: frontend
3030
run: npm install
@@ -45,9 +45,9 @@ jobs:
4545
- name: Use Node.js
4646
uses: actions/setup-node@v4
4747
with:
48-
node-version: 20.x
48+
node-version-file: 'frontend/package.json'
4949
cache: npm
50-
cache-dependency-path: frontend/package-lock.json
50+
cache-dependency-path: frontend/package.json
5151
- name: Setup Pages
5252
uses: actions/configure-pages@v5
5353
with:

frontend/README.md

Lines changed: 3 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -11,73 +11,9 @@ Export to static files: $ npm run export
1111

1212
Testing
1313
-------------
14-
15-
### Unit Tests
16-
17-
The project uses Jest and React Testing Library for unit and component tests. Test files are colocated with their source files using the `.test.tsx` or `.test.ts` extension.
18-
19-
**Run all unit tests:**
20-
```bash
21-
npm test
22-
```
23-
24-
**Run tests in watch mode (useful during development):**
25-
```bash
26-
npm run test:watch
27-
```
28-
29-
**Run tests with coverage report:**
30-
```bash
31-
npm run test:coverage
32-
```
33-
34-
The coverage report will be generated in the `coverage/` directory.
35-
36-
### Writing Tests
37-
38-
- Place test files next to the source file: `Component.tsx``Component.test.tsx`
39-
- Use React Testing Library for component testing
40-
- Follow the existing patterns in the codebase
41-
- Mock external dependencies (fetch, analytics, Next.js router)
42-
43-
Example:
44-
```tsx
45-
import { render, screen } from '@testing-library/react';
46-
import userEvent from '@testing-library/user-event';
47-
import MyComponent from './MyComponent';
48-
49-
describe('MyComponent', () => {
50-
it('renders correctly', () => {
51-
render(<MyComponent />);
52-
expect(screen.getByText('Expected Text')).toBeInTheDocument();
53-
});
54-
55-
it('handles user interaction', async () => {
56-
const user = userEvent.setup();
57-
render(<MyComponent />);
58-
59-
await user.click(screen.getByRole('button'));
60-
61-
expect(screen.getByText('Clicked!')).toBeInTheDocument();
62-
});
63-
});
64-
```
65-
66-
### Test Structure
67-
68-
```
69-
frontend/
70-
├── components/
71-
│ ├── MyComponent.tsx
72-
│ ├── MyComponent.test.tsx # Unit test (colocated)
73-
│ └── ...
74-
├── __mocks__/ # Jest mocks
75-
│ ├── next/
76-
│ ├── aphrodite.js
77-
│ └── unfetch.js
78-
├── jest.config.js
79-
└── jest.setup.js
80-
```
14+
Run tests: $ npm test
15+
Run tests in watch mode: $ npm run test:watch
16+
Run tests with coverage: $ npm run test:coverage
8117

8218
Deployment
8319
-------------

frontend/playwright-report/index.html

Lines changed: 0 additions & 85 deletions
This file was deleted.

frontend/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"node_modules",
3030
"**/*.test.ts",
3131
"**/*.test.tsx",
32-
"e2e/**/*",
3332
"jest.d.ts",
3433
"jest.setup.js"
3534
]

0 commit comments

Comments
 (0)