Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cjatkinson/chris-playwright-demo

Playwright demo by Chris Atkinson
https://github.com/cjatkinson/chris-playwright-demo

circleci page-object-model playwright typescript

Last synced: about 1 month ago
JSON representation

Playwright demo by Chris Atkinson

Awesome Lists containing this project

README

        

# chris-playwright-demo 🎭

## Description

This is a Playwright demo implementation by [Chris Atkinson](mailto:[email protected]).

The framework implements a [page object pattern](https://playwright.dev/docs/pom) for easy test authoring and maintenance. The UI tests are designed to evaluate four criteria of pages.
* Are all of the interactive elements present on the page?
* Can the page successfully render a front-end error?
* Can the page successfully render a back-end error?
* Can the primary functionality of the page be achieved?

The project is integrated with [CircleCI](https://circleci.com/) for continuous integration.

## Installation

1. Clone this repository:

```bash
git clone [email protected]:cjatkinson/chris-playwright-demo.git
```

2. Install the dependencies:

```bash
cd chris-playwright-demo
npm i
```

3. Test the installation:

```bash
npm run test
```

The framework will run the test suite against Chrome and Firefox. The last test is the suite fails intentionally to demonstrate some of the implementaion features. If you run into issues, please let me know [via email](mailto:[email protected]).

## Usage

The framework can be run in a variety of modes, abstracted as scripts in `node_modules`.

```bash
# run the framework in headless mode
npm run test
```

```bash
# run the framework in headed mode
npm run test:head
```

```bash
# run the framework in UI mode
npm run test:ui
```

```bash
# run only tests tagged with @smoke
npm run test:smoke
```

## TODO
* Implement API test suite.