Skip to content

Commit df4c09b

Browse files
committed
updated copilot-instructions to take into account that environment is already set up
1 parent 795f3f0 commit df4c09b

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/copilot-instructions.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ pytest tests/unit/ -v
6767

6868
# Run specific test file
6969
pytest tests/unit/test_library_handler.py -v
70-
71-
# Expected: 17 tests passing
7270
```
7371

7472
#### Integration Tests (Requires running server)
@@ -78,25 +76,21 @@ python -m ttmp32gme.ttmp32gme
7876

7977
# Terminal 2: Run integration tests
8078
pytest tests/test_web_frontend.py -v
81-
82-
# Expected: 8 tests passing
8379
```
8480

8581
#### E2E Tests (Selenium, requires full setup)
8682
```bash
8783
# One-time setup (installs Chrome, tttool, etc.)
88-
./setup_e2e_environment.sh -b
84+
./ttmp32gme > /tmp/server.log 2>&1 & sleep(2) # Start server in background
8985

9086
# Run all E2E tests
91-
./run_e2e_tests.sh
87+
./pytest tests/e2e/ -v
9288

9389
# Run specific test
94-
./run_e2e_tests.sh -t test_upload_album_with_files
90+
pytest tests/e2e/test_upload_album_with_files.py -v
9591

9692
# Run tests matching keyword
97-
./run_e2e_tests.sh -k upload
98-
99-
# Expected: 26 tests, server starts/stops automatically
93+
pytest -k upload -v
10094
```
10195

10296
**E2E Test Markers**:
@@ -170,8 +164,11 @@ SQLite connection uses `check_same_thread=False` for Flask's multi-threaded envi
170164
4. Return JSON for AJAX or render template for pages
171165

172166
### Fixing E2E Test Issues
173-
1. Run single test: `./run_e2e_tests.sh -s -t test_name`
174-
2. Check server logs in test output
167+
1. Before re-running specific test, start the server manually:
168+
```bash
169+
./ttmp32gme > /tmp/server.log 2>&1 & sleep(2) # Start server in background
170+
```
171+
2. Check server logs in `/tmp/server.log` for errors
175172
3. Add debug statements to test for element visibility
176173
4. Use explicit waits: `WebDriverWait(driver, 5).until(...)`
177174

0 commit comments

Comments
 (0)