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
+
# Run only WebKit tests
34
+
npm run test:e2e:webkit
35
+
36
+
# Debug tests
37
+
npm run test:e2e:debug
38
+
```
39
+
40
+
## Test Coverage
41
+
42
+
The tests cover the following core functionality:
43
+
44
+
### Homepage Tests
45
+
- Page loads with correct title and content
46
+
- Dog list displays properly
47
+
- Loading states work correctly
48
+
- Error handling for API failures
49
+
50
+
### About Page Tests
51
+
- About page content displays correctly
52
+
- Navigation back to homepage works
53
+
54
+
### Dog Details Tests
55
+
- Navigation from homepage to dog details
56
+
- Navigation back from dog details to homepage
57
+
- Handling of invalid dog IDs
58
+
59
+
### API Integration Tests
60
+
- Successful API responses
61
+
- Empty dog list handling
62
+
- Network error handling
63
+
64
+
## Configuration
65
+
66
+
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