Coder Social home page Coder Social logo

briebug / cypress-schematic Goto Github PK

View Code? Open in Web Editor NEW
154.0 6.0 25.0 1.48 MB

**⛔️ DEPRECATED** Add cypress to an Angular CLI project

License: MIT License

JavaScript 4.21% TypeScript 49.10% HTML 46.42% CSS 0.14% SCSS 0.14%
cypress cypress-schematic angular e2e-tests angular-builders angular-schematics hacktoberfest deprecated

cypress-schematic's Introduction

⛔️ DEPRECATED ⛔️ Cypress Angular Schematic

npm (scoped) Downloads

Cypress Schematic Logo

⛔️ DEPRECATED ⛔️

This Angular Schematic has been adopted by Cypress and will be maintained in their repository by the Cypress Team moving forward. Head over to https://github.com/cypress-io/cypress/tree/develop/npm/cypress-schematic for more info, and feel free to contribute!

Thank you

Thank you to the contributors of this library @muuvmuuv, @konstantindenerz, @cexbrayat, @MrCube42, @devinshoemaker, @Ant59, @NileshPatel17, @timtim5174, @tabuckner, and @bovandersteene. Thank you @schuchard for pioneering the sandbox approach for developing Angular schematics.


Add Cypress to an Angular CLI project

This schematic will:

  • install Cypress, its dependencies, and new scripts
  • add necessary files for Cypress to work with Angular & Typescript
  • prompt for removal of Protractor files and configuration

Usage 🚀

Run as one command in an Angular CLI app directory. Note this will add the schematic as a dependency to your project.

ng add @briebug/cypress-schematic

With the custom builder installed, you can run cypress with the following commands:

ng e2e
ng run {your-project-name}:cypress-open

These two commands do the same thing. They will launch the (Electron) Cypress Test Runner in watch mode.

ng run {your-project-name}:cypress-run

This command will open the (Electron) Cypress Test Runner and run your tests one time, with output to your terminal.

Options

Option Description
addCypressTestScripts This will add Cypress open and run command scripts to your package.json. Include --addCypressTestScripts in your ng add command.
noBuilder This will skip the builder addition, leaving the angular.json file unmodified and requiring you to run Cypress from the command line or through your IDE. Include --noBuilder in your ng add command.

Issues

Issues with this schematic can be filed here.

If you want to contribute (or have contributed in the past), feel free to add yourself to the list of contributors in the package.json before you open a PR!

Development 🛠

Getting started

Node.js and npm are required for the scripts. Make sure it's installed on your machine.

Install the dependencies for the schematic and the sandbox application

npm i && cd sandbox && npm i && cd ..

🖇 Link the schematic in the sandbox to run locally

npm run link:sandbox

🏃 Run the schematic

npm run build:clean:launch

E2E testing

Execute the schematic against the sandbox. Then run linting, unit & e2e tests and a prod build in the sandbox.

npm run test

Unit Testing

Run the unit tests using Jasmine as a runner and test framework.

npm run test:unit

Reset the sandbox

Running the schematic locally makes file system changes. The sandbox is version controlled so that viewing a diff of the changes is trivial. After the schematic has run locally, reset the sandbox with the following.

npm run clean

cypress-schematic's People

Contributors

ant59 avatar anthonymjones avatar bovandersteene avatar cexbrayat avatar dependabot[bot] avatar devinshoemaker avatar konstantindenerz avatar mrcube42 avatar muuvmuuv avatar nileshpatel17 avatar tabuckner avatar timtim5174 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.