Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vdsabev/cypress-cucumber-typescript-starter
A structured template for using Cypress with Cucumber and TypeScript.
https://github.com/vdsabev/cypress-cucumber-typescript-starter
cucumber cypress testing-automation testing-framework typescript
Last synced: about 19 hours ago
JSON representation
A structured template for using Cypress with Cucumber and TypeScript.
- Host: GitHub
- URL: https://github.com/vdsabev/cypress-cucumber-typescript-starter
- Owner: vdsabev
- License: mit
- Created: 2020-12-05T10:23:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T20:39:55.000Z (about 4 years ago)
- Last Synced: 2024-12-18T22:41:51.685Z (about 2 months ago)
- Topics: cucumber, cypress, testing-automation, testing-framework, typescript
- Language: TypeScript
- Homepage:
- Size: 119 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cypress + Cucumber + Typescript Starter
A structured template for using Cypress with Cucumber and TypeScript.## Setup
Install Node.js (version LTS recommended) from https://nodejs.orgThen run the following command in the root folder:
```sh
npm install
```## Commands
After the packages install successfully we can run any of the following commands.### `npm start`
Opens the Cypress UI. Used to execute individual feature files or inspect the browser.### `npm test`
Runs all tests in the console. Used in CI or to quickly execute all feature files.## Folder structure
- `cypress`
- `integration`
- `common` - contains functionality used by all features; feel free to add more step definitions, before / after hooks, or common modules to import in other tests
- `Amazon` - a more complex and structured example using multiple pages, inheritance, access modifiers, and extracted element classes
- `DuckDuckGo` - an example of the simplified object-based API - no classes or access modifiers necessary, just specify the page configuration options and write element selectors
- `support` - utility functions and classes for creating pages, controlling the browser, and selecting DOM elements
- `customParameterTypes` - defines custom parameter types like `{ordinal}`. **Only import once per feature!** Can't be used in `common` because those step definitions get imported after every feature's step definitions and so will produce a conflict.## Resources
- Cypress API documentation: https://docs.cypress.io/api
- Writing Cucumber expressions: https://cucumber.io/docs/cucumber/cucumber-expressions
- Configuration options: https://github.com/TheBrainFamily/cypress-cucumber-preprocessor