You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains Playwright end-to-end tests for the Tailspin Shelter website.
4
+
5
+
## Test Files
6
+
7
+
-`homepage.spec.ts` - Tests for the main homepage functionality
8
+
-`about.spec.ts` - Tests for the about page
9
+
-`dog-details.spec.ts` - Tests for individual dog detail pages
10
+
-`api-integration.spec.ts` - Tests for API integration and error handling
11
+
12
+
## Running Tests
13
+
14
+
### Prerequisites
15
+
16
+
Make sure you have installed dependencies:
17
+
```bash
18
+
npm install
19
+
```
20
+
21
+
### Running Tests
22
+
23
+
```bash
24
+
# Run all tests
25
+
npm run test:e2e
26
+
27
+
# Run tests with UI mode (for debugging)
28
+
npm run test:e2e:ui
29
+
30
+
# Run tests in headed mode (see browser)
31
+
npm run test:e2e:headed
32
+
33
+
# Debug tests
34
+
npm run test:e2e:debug
35
+
```
36
+
37
+
## Test Coverage
38
+
39
+
The tests cover the following core functionality:
40
+
41
+
### Homepage Tests
42
+
- Page loads with correct title and content
43
+
- Dog list displays properly
44
+
- Loading states work correctly
45
+
- Error handling for API failures
46
+
47
+
### About Page Tests
48
+
- About page content displays correctly
49
+
- Navigation back to homepage works
50
+
51
+
### Dog Details Tests
52
+
- Navigation from homepage to dog details
53
+
- Navigation back from dog details to homepage
54
+
- Handling of invalid dog IDs
55
+
56
+
### API Integration Tests
57
+
- Successful API responses
58
+
- Empty dog list handling
59
+
- Network error handling
60
+
61
+
## Configuration
62
+
63
+
Tests are configured in `../playwright.config.ts` and automatically start the application servers using the existing `scripts/start-app.sh` script before running tests.
0 commit comments