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.
Before you get started, you'll need to have the following installed on your machine:
- Node.js (version v16.8 or higher)
- PNPM
- Clone this repository to your local machine
- Open a terminal in the project's root directory
- Run
pnpm install
to install the project's dependencies
- Open a terminal in the project's root directory
- Run
pnpm dev
to start the development server - Open
http://localhost:3000
in your browser to view the website
- Open a terminal in the project's root directory
- Run
pnpm build
to build the production version of the website - Run
pnpm start
to start the production server - Open
http://localhost:3000
in your browser to view the website
- Open a terminal in the project's root directory
- Run
pnpm test
to run the e2e tests using Playwright
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.
Are you interested on learning Playwright? Have a look at my course here!