/buy-right

Buy Right (fake) E-Commerce made for the Playwright Course on Educative

Primary LanguageTypeScript

Welcome to Buy-Right

Buy-Right is a little fake e-commerce created as a reference for this course about testing with Playwright.

The website is built using TypeScript, Next.js and PNPM as the package manager.

Getting Started

Prerequisites

Before you get started, you'll need to have the following installed on your machine:

  • Node.js (version v16.8 or higher)
  • PNPM

Installation

  1. Clone this repository to your local machine
  2. Open a terminal in the project's root directory
  3. Run pnpm install to install the project's dependencies

Starting the Development Server

  1. Open a terminal in the project's root directory
  2. Run pnpm dev to start the development server
  3. Open http://localhost:3000 in your browser to view the website

Building the Production Version

  1. Open a terminal in the project's root directory
  2. Run pnpm build to build the production version of the website
  3. Run pnpm start to start the production server
  4. Open http://localhost:3000 in your browser to view the website

Testing

  1. Open a terminal in the project's root directory
  2. Run pnpm test to run the e2e tests using Playwright

Project Structure

The project's source code is located in the src directory, and the compiled code is located in the .next directory. The project's configuration files (e.g. tsconfig.json, next.config.js) are located in the project's root directory.

The src/app directory contains the website's pages, and the src/components directory contains reusable components.

The e2e tests are located in the tests directory. The tests use Playwright to interact with the website and make assertions.

Educative

Are you interested on learning Playwright? Have a look at my course here!