Skip to content
Debbie O'Brien edited this page Jan 16, 2025 · 3 revisions

Introduction

This repository provides a comprehensive guide to writing Playwright tests, covering a wide range of scenarios to ensure your application is robust and reliable. The source code is a demo Movies App built with Next.js and React, utilizing the The Movie Database (TMDB) API for testing purposes. This project is a fork of next-movies.

Getting Started

  1. Clone the Repository:

    git clone https://github.com/debs-obrien/playwright-movies-app.git
    cd playwright-movies-app
    npm install
  2. Environment Setup for Login Tests:

    • Rename the .env.example file to .env, which already contains the necessary variables.

Project Structure

Here is an overview of the project's structure:

  • movies-app/: Contains the source code of the Movies App.
  • tests/: Contains Playwright tests.

Running Tests

  1. Run the Tests:
    npx playwright test --ui
  2. Run the Tests in VS Code:

FAQ

  1. How do I run the app locally?
    • Make sure port 3000 is available. Use the following commands:
      npm run dev        # for development build
      npm run build      # for production build
      npm run start      # to start the project
Clone this wiki locally