https://github.com/rohanharikr/pangolier
A Declarative Web UI Test Framework
https://github.com/rohanharikr/pangolier
Last synced: 23 days ago
JSON representation
A Declarative Web UI Test Framework
- Host: GitHub
- URL: https://github.com/rohanharikr/pangolier
- Owner: rohanharikr
- License: mit
- Created: 2023-02-12T08:44:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T11:37:31.000Z (about 2 years ago)
- Last Synced: 2025-04-09T15:51:53.276Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://pangolier.dev
- Size: 245 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pangolier
## A Declarative Web UI Test Framework.
With Pangolier, you can easily define and test your flows in YAML.> The project is in it’s infancy and not intended to be used in production.
Expect breaking API changes until 1.0```yaml
test: should allow me to add todo items
---
- loadUrl: https://demo.playwright.dev/todomvc
- clickOn: "[placeholder='What needs to be done?']"
- type: buy some cheese
- pressKey: Enter
- assertVisible:
selector: $todo-title
text: buy some cheese
- clickOn: "[placeholder='What needs to be done?']"
- type: feed the cat
- pressKey: Enter
- assertVisible:
selector: $todo-title
index: 0
text: buy some cheese
- assertVisible:
selector: $todo-title
index: 1
text: feed the cat
```The same test written with Playwright:
```
https://github.com/microsoft/playwright/blob/main/examples/todomvc/tests/integration.spec.ts#L20
```The project is a port of [Maestro](https://maestro.mobile.dev/) for the web platform and uses [Playwright](https://playwright.dev/) under the hood. The documentation website has also been adapted from [Maestro](https://maestro.mobile.dev/).
## Installation & Usage
### Install
```shell
npm i pangolier --save-dev
```### Add test script to package.json
```json
{
"scripts": {
"test": "pangolier ./tests"
}
}
```### Run
```shell
npm test
```
Runs against all the `.yaml` files in the specified directory.## Examples
The [todomvc example tests for Playwright](https://github.com/microsoft/playwright/tree/main/examples/todomvc) have been re-written for Pangolier which you can find here. Note that some of the functionalities may be missing in the reimplementation.
## Roadmap
The immediate goal of the project is to port all the features from Maestro to Pangolier.
Contributions welcome!
[^pango]
[^pango]: Mr. Pango, the mascot for Pangolier; wielding his sword, the “Swashbuckle”.
Artwork by Reddit user [TalonP](https://www.reddit.com/user/TalonP/).