Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goenning/typescript-selenium-example
Example of Page Object with Selenium, Node.js and Typescript
https://github.com/goenning/typescript-selenium-example
e2e integration-tests selenium typescript
Last synced: 3 months ago
JSON representation
Example of Page Object with Selenium, Node.js and Typescript
- Host: GitHub
- URL: https://github.com/goenning/typescript-selenium-example
- Owner: goenning
- License: mit
- Created: 2017-06-29T21:08:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T04:23:35.000Z (over 2 years ago)
- Last Synced: 2024-10-10T05:37:31.417Z (4 months ago)
- Topics: e2e, integration-tests, selenium, typescript
- Language: TypeScript
- Size: 30.3 KB
- Stars: 117
- Watchers: 8
- Forks: 61
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TypeScript + Selenium example
This is a working example of using `Selenium`, `TypeScript` and [Page Object Pattern](https://martinfowler.com/bliki/PageObject.html).
These are real test cases that run against a [Fider](http://getfider.com) instance.
Check out a running example of the application at [http://demo.fider.io](http://demo.fider.io).The tests are available in both TDD and BDD style.
# How it is structured
```
.
├── lib/
├── pages/
├── specs/
├── tests/
└── config.ts
```- `lib`: Think of this as a "framework". Ideally should be a separate module distributed on `npm`
- `pages`: These are your `Page Object` models. Each Page of your application should have a PageObject that maps all the elements and actions
- `specs`: All your BDD-style tests goes here
- `tests`: All your TDD-style/classic tests goes here
- `config.ts`: General configuration and settings that are read by tests## Test Case #1: Unauthenticated cannot submit ideas
`Unauthenticated users` should NOT be see `Description field` and `Submit button` after typing the title.
## Test Case #2: Authenticated can submit ideas
`Authenticated users` should be able to submit new ideas by clicking on `Submit button` after typing the title.
After new idea is submitted, user should be redirect to the new idea's display page.# See the tests
- TDD: [tests/test.ts](tests/test.ts)
- BDD: [specs/spec.ts](specs/spec.ts)