https://github.com/padcom/cypress-pop
https://github.com/padcom/cypress-pop
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/padcom/cypress-pop
- Owner: padcom
- Created: 2024-01-17T14:40:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T15:07:02.000Z (over 2 years ago)
- Last Synced: 2025-02-04T16:48:27.711Z (over 1 year ago)
- Language: TypeScript
- Size: 112 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Page Object Pattern for Cypress
This package implements the basics of the [PageObject Pattern](https://www.awesome-testing.com/2019/03/selenium-page-object-pattern-how-to) for use with Cypress.
For a long and boring explanation read those two ancient articles:
- [Writing Selenium tests with style](https://padcom13.blogspot.com/2014/01/writing-selenium-tests-with-style.html)
- [Selenium and reusable scenarios](https://padcom13.blogspot.com/2014/02/selenium-and-reusable-scenarios.html)
Yes, those are about writing tests with Selenium and yes they talk about Java implementation but the concepts are exactly the same and the 3 base concepts (`Component`, `Page` and `Scenario`) are exactly the same.
You could also scaffold an project for use with this library by running the following command:
```
npm create from-github padcom/cypress example
```
In there you will find a test that exercises the https://www.duckduckgo.com site. It does so by defining a page, a few components and one search scenario. It's the best place to get started.
For convenience there is also a library template if you want to create reusable packages that can be used in many different projects:
```
npm create from-github padcom/cypress-lib example-lib
```