by Code Mortals
npm install -g @angular/cli
ng new codemortals
cd codemortals
ng serve
http://localhost:4200
version: 2
jobs:
build:
docker:
- image: circleci/node:10
steps:
- checkout
- run: npm install
- run: npm run build
- store_artifacts:
path: dist
npm install cypress --save-dev
npm run cypress:open
github.com/TheBrainFamily/cypress-cucumber-preprocessor
npm install --save-dev cypress-cucumber-preprocessor
// cypress/plugins/index.js
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
}
// cypress.json
{
"testFiles": "**/*.feature"
}
// cypress/integration/Google.feature
Feature: The Facebook
I want to open a social network page
@focus
Scenario: Opening a social network page
Given I open Google page
Then I see "google" in the title
// cypress/integration/navigation.js
import { Given } from "cypress-cucumber-preprocessor/steps";
Given('I open {string}', (url) => {
cy.visit(url)
})