Skip to content

Commit 4aff354

Browse files
committed
Refactor testing section in Copilot instructions for clarity and organization
1 parent 989a6aa commit 4aff354

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/copilot-instructions.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@ The Tailspin Shelter is a full-stack web application that showcases a fictional
55
## Technology Stack
66

77
### Frontend (Client)
8+
89
- **Framework**: [Astro](https://astro.build/) v5.4+ - Static site generator with server-side rendering
910
- **Component Library**: [Svelte](https://svelte.dev/) v5.23+ - For dynamic interactive components
1011
- **Styling**: [Tailwind CSS](https://tailwindcss.com/) v4.0+ - Utility-first CSS framework
1112
- **Language**: TypeScript - Strongly typed JavaScript
1213
- **Adapter**: Node.js adapter for server-side rendering
13-
- **E2E Testing**: [Playwright](https://playwright.dev/) v1.49+ - End-to-end testing framework
1414

1515
### Backend (Server)
16+
1617
- **Framework**: [Flask](https://flask.palletsprojects.com/) - Python web framework
1718
- **Database**: SQLite with [SQLAlchemy](https://www.sqlalchemy.org/) ORM
1819
- **Language**: Python 3.13+ with type hints
1920
- **CORS**: Flask-CORS for cross-origin requests
20-
- **Testing**: Python unittest framework
21+
22+
### Testing
23+
24+
- **Python/Server/Flask**: Python unittest framework
25+
- **E2E testing**: [Playwright](https://playwright.dev/) v1.49+ - End-to-end testing framework
2126

2227
## Project Structure
2328

@@ -51,7 +56,7 @@ pets-workshop/
5156
### Use Scripts, Not Direct Commands
5257
**IMPORTANT**: Always prefer using the provided scripts in the `scripts/` directory rather than running commands directly:
5358
- **Testing**: Use `./scripts/run-server-tests.sh` instead of `python -m unittest`
54-
- **E2E Testing**: Use `npm run test:e2e` in the `client/` directory for Playwright tests
59+
- **E2E Testing**: Use `./scripts/run-e2e-tests` instead of `npm run tests:e2e`
5560
- **Environment Setup**: Use `./scripts/setup-environment.sh` for initial setup
5661
- **Application Start**: Use `./scripts/start-app.sh` to launch the application
5762

@@ -65,7 +70,7 @@ pets-workshop/
6570
- **Data Fetching**: Fetch data on the server side when possible
6671
- **Styling**: Use Tailwind utility classes, avoid custom CSS unless necessary
6772
- **Routing**: File-based routing through Astro's pages directory
68-
- **Test Identifiers**: Always include `data-testid` attributes for E2E testing resilience (see [`test-identifiers.md`](.github/instructions/test-identifiers.md))
73+
- **Test Identifiers**: Always include `data-testid` attributes for E2E testing resilience (see [`test-identifiers.md`](./instructions/test-identifiers.md))
6974

7075
### Database Patterns
7176
- **Models**: Use SQLAlchemy declarative base with proper relationships
@@ -77,11 +82,7 @@ pets-workshop/
7782
Below are the only types of tests we use in this project. Do not add additional test types unless instructed otherwise.
7883

7984
- **E2E Tests**: Playwright tests in `client/e2e-tests/` cover full user workflows
80-
- **Test Structure**: Organize tests by page/feature (homepage, dog-details, API integration)
81-
- **Test Commands**: Use `npm run test:e2e` for all tests, `npm run test:e2e:ui` for debugging
82-
- **Test Identifiers**: Always use `data-testid` attributes for reliable element selection (see [`test-identifiers.md`](.github/instructions/test-identifiers.md))
83-
- **Server Tests**: Python unittest framework for backend API testing
84-
- **Test Coverage**: Include tests for user interactions, API responses, and error handling
85+
- **Unit tests**: Unit tests for Flask endpoints and utilities, stored in `server/tests`
8586

8687
## Coding Standards
8788

0 commit comments

Comments
 (0)