Skip to content

Commit a0c66e8

Browse files
Merge branch 'main' into add-copyright-headers
2 parents e42bfcf + 2facecc commit a0c66e8

File tree

12 files changed

+993
-1025
lines changed

12 files changed

+993
-1025
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Playwright Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
timeout-minutes: 60
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Install Playwright Browsers
21+
run: npx playwright install --with-deps
22+
- name: Run Playwright tests
23+
run: npx playwright test --update-snapshots
24+
- uses: actions/upload-artifact@v4
25+
if: always()
26+
with:
27+
name: playwright-report
28+
path: playwright-report/
29+
retention-days: 30

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
# testing
1010
/coverage
11+
/test-results/
12+
/playwright-report/
13+
/playwright/.cache/
14+
/tests/*-snapshots/
1115

1216
# next.js
1317
/.next/
@@ -39,3 +43,6 @@ next-env.d.ts
3943
.netlify
4044

4145
.env
46+
47+
# Task list for Claude
48+
TASKS.md

CLAUDE.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
- `npm run build` - Build for production
88
- `npm run start` - Start production server
99
- `npm run lint` - Run linting with ESLint
10-
- Testing: Use `/api/test` endpoint in development mode only
10+
- `npm test` - Run Playwright tests
11+
- `npm run test:ui` - Run tests with Playwright UI
12+
- `npm run test:debug` - Run tests in debug mode
13+
- `npm run test:visual` - Run visual regression tests
14+
- Testing: Use `/api/test` endpoint in development mode only (accessible via Test Controls button)
15+
16+
## Development Approach
17+
- Use Test-Driven Development (TDD) when implementing new features
18+
- Write tests first, ensure they fail, then implement the feature
19+
- Use Playwright for visual regression and integration testing
20+
- Add data-testid attributes to elements for reliable test selection
21+
- For API changes, use the test endpoint or create simple test scripts
22+
- Verify changes work in both development and production builds
1123

1224
## Code Style Guidelines
1325
- TypeScript: Strict mode with strictNullChecks enabled
@@ -17,4 +29,26 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1729
- Error handling: Use try/catch with specific error types when possible
1830
- Naming: PascalCase for components, camelCase for functions/variables
1931
- Styling: Use Tailwind CSS with custom theme extensions
20-
- State management: Use React hooks (useState, useEffect)
32+
- State management: Use React hooks (useState, useEffect)
33+
34+
## Copyright Headers
35+
All source files must include the following copyright header:
36+
```
37+
/*
38+
* Copyright The OpenTelemetry Authors
39+
* SPDX-License-Identifier: Apache-2.0
40+
*/
41+
```
42+
43+
## Project Structure
44+
- `/src/app` - Next.js app router pages and API routes
45+
- `/src/components` - React components
46+
- `/src/lib` - Utility functions and shared code
47+
- `/src/types` - TypeScript type definitions
48+
49+
## PR Guidelines
50+
- Each PR should address a single issue
51+
- Reference the issue number in the PR description with "Closes #X"
52+
- All linting must pass (`npm run lint`)
53+
- Make sure all copyright headers are present
54+
- Keep changes focused and minimal

README.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
# OpenTelemetry Changelog
2+
3+
This is the source repository for [changelog.opentelemetry.io](https://changelog.opentelemetry.io), a website that tracks changes across OpenTelemetry repositories.
24

35
## Getting Started
46

@@ -27,10 +29,35 @@ To learn more about Next.js, take a look at the following resources:
2729
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
2830
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
2931

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
32+
## Testing
33+
34+
This project uses Playwright for end-to-end and visual regression testing.
35+
36+
To run tests:
37+
38+
```bash
39+
# Install Playwright browsers and dependencies
40+
npx playwright install --with-deps
41+
42+
# Run all tests
43+
npm test
44+
45+
# Run tests with UI
46+
npm run test:ui
47+
48+
# Run tests in debug mode
49+
npm run test:debug
50+
51+
# Run only visual regression tests
52+
npm run test:visual
53+
```
54+
55+
Tests are located in the `tests` directory and are organized by feature. Visual regression tests automatically capture screenshots for comparison against baselines.
56+
57+
## Contributing
3158

32-
## Deploy on Vercel
59+
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to contribute to this project.
3360

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
61+
## License
3562

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
63+
Apache-2.0 - See [LICENSE](./LICENSE) for more information.

0 commit comments

Comments
 (0)