Socket
Socket
Sign inDemoInstall

@cognifide/e2e

Package Overview
Dependencies
39
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cognifide/e2e

Cognifide default setup for Puppeteer and Protractor tests


Version published
Weekly downloads
3
increased by200%
Maintainers
3
Install size
7.45 MB
Created
Weekly downloads
 

Readme

Source

Cognifide logo

@Cognifide E2E config

Cognifide default setup for Puppeteer and Protractor tests.

Installation

$ npm install @cognifide/e2e --global

Usage

$ coge2e init

Running this command will init setup and allow to select which configuration should be added.

Protractor setup

Running the tests

To run test with default configuration:

npm run test

There are two ways to run Protractor tests on specific environment: one way is to add another parameter --params.env [env_name]. List of available environment you an find in /data/env.json. The second way, easiest, is to run specific npm script: by default, configuration comes with 4 environments:

  • local - default environment which is tested when npm run test is executed
  • dev
  • staging
  • prod

In order to run tests on, for example, on prod environment simply run npm run test:prod

npm run test --params.env staging
/* or */
npm run test:staging

Real life example:

npm run test
    --suite homepage
    --exclude tests/analytics/homepage.js
    --params.env prod

/* or */

npm run test:prod
    --suite homepage
    --exclude tests/analytics/homepage.js

How to write Protractor tests

  • Get familiar with technology stack:
    • https://www.protractortest.org/
    • https://jasmine.github.io/
  • Read about:

Puppeteer & Jest setup

Running the tests

Similar to Protractor config, default configuration comes with 4 default environments:

  • local - default environment which is tested when npm run test is executed
  • dev
  • staging
  • prod

Tests can be run on specific environment by running scripts like npm run test:prod. The only difference is that it's not possible to pass arguments like --params.env prod to the script, so trying to run npm run test --params.env prod will result in error. The only acceptable arguments are those that are available for Jest CLI options.

How to write Puppeteer tests

License

MIT

Keywords

FAQs

Last updated on 31 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc