https://github.com/debs-obrien/playwright-movies-app
Playwright tests for a Movie App
https://github.com/debs-obrien/playwright-movies-app
playwright tests
Last synced: 3 months ago
JSON representation
Playwright tests for a Movie App
- Host: GitHub
- URL: https://github.com/debs-obrien/playwright-movies-app
- Owner: debs-obrien
- License: mit
- Created: 2025-01-09T22:03:17.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-23T13:01:42.000Z (3 months ago)
- Last Synced: 2025-01-29T10:56:21.048Z (3 months ago)
- Topics: playwright, tests
- Language: JavaScript
- Homepage: https://debs-obrien.github.io/playwright-movies-app/
- Size: 3.63 MB
- Stars: 21
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Playwright Movies App
This repository provides a comprehensive guide to writing end-to-end tests with [Playwright](https://playwright.dev/), covering a wide range of scenarios to ensure your application is robust and reliable. Learn how to write tests for Authentication, Search, Sorting, API and API mocking, ARIA snapshots, and more.
The source code is a demo Movies App built with Next.js and React, utilizing the [The Movie Database (TMDB)](https://www.themoviedb.org/) API for testing purposes. This project is a fork of [next-movies](https://github.com/tastejs/next-movies) and has been customized to meet our specific requirements.

## Installation
Clone the repository and then install the dependencies:
```bash
git clone https://github.com/debs-obrien/playwright-movies-app.git
cd playwright-movies-app
npm install
```## Environment Setup for Login Tests
To run the login tests, you need to set up environment variables in a `.env` file. You can do this by renaming the `.env.example` file to `.env`, which already contains the necessary variables. Note that this app uses a mock backend, so any username and password will work.
## Running Tests
Run the tests using UI mode to walk through a trace of each test:
```bash
npx playwright test --ui
```Alternatively, you can run the tests directly in VS Code with the [Playwright VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright).
## Running the APP locally
Make sure port 3000 is available as the app needs to run on this port. Using a different port will result in errors because the movies loaded from the API use this port.
* `npm run dev`: dev build
* `npm run build`: production build
* `npm run start`: start the project## Wiki
Check out the [wiki](https://github.com/debs-obrien/playwright-movies-app/wiki) for more info on the contents of each folder.
## License
[MIT](https://choosealicense.com/licenses/mit/)