Git Product home page Git Product logo

percy-node's Introduction

Build Status

Important notice of archive

Hi there friend. The team at Google that originally started this package is no longer using Percy and thus it will no longer be maintained. For that reason, we'll be moving this to the archive. If you'd like to take ownership of it, feel free to fork it.

percy-node

This is a wrapper of percy-js that simplifies the API so it can be used for automated visual regression testing in node environments such as testing an express app, an Angular app, or AngularJS app.

For more general information about Percy, visit Percy's homepage

This is not an official Google product.

How to use

Percy-node is an installable npm package.

npm install percy-node --save-dev

Feature

Percy-node provides an optional feature to return Percy build results. Passing 'true' to finalizeBuild() to enable that feature. You also need a token with read access, please reach out to the Percy team for that.

const percyNodeClient = require('percy-node');
percyNodeClient.finalizeBuild(true);

Motivation

This package was originally created specifically to allow testing of Express AngularJS apps tested with Jasmine, Karma, and Protractor. However, it is written in a general enough way that it could be used in another node based testing environment.

How to use with Protractor

See the Protractor guide

Contributing

See CONTRIBUTING.md

percy-node's People

Contributors

bogusred avatar dependabot[bot] avatar luzhang avatar nckh avatar

Stargazers

 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  avatar

percy-node's Issues

Port bug fix for clobbered assets

Hello! We fixed a high-priority asset discovery bug in ember-percy and noticed that the gatherBuildResources method was also duplicated into this project with the same bug present.

The bug is present here:

function gatherBuildResources(percyClient, buildDirs, rootDirs) {

You should upgrade percy-client to 2.10.0, and then remove gatherBuildResources entirely and use the new method present on PercyClient objects: percyClient.gatherBuildResources.

See here for a reference bugfix from ember-percy: percy/percy-ember#70

Key to note: the method now returns an array, instead of a hash. If you need the hash you'll want to construct it in the same way as in the above reference.

Setup npm package

  • confirm package.json is formed correctly
  • add to npm registry
  • fix how to use section with docs

Add clarifications to protractor docs

Feedback from Tim at Percy:

  • It may be helpful to mention that the doc assumes you've already setup PERCY_TOKEN and PERCY_PROJECT in your environment somewhere.

  • I wondered if adding an S and calling it BREAKPOINT_WIDTHS might be a more appropriate name given there will commonly be multiple widths.

  • In the "add test specs" section you have const protractorHelpers = require('../path/to/percy-helpers');.

Instead of calling it protractorHelpers, you could call it percy here, so then you can use => percy.snapshot('homepage', ....)

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.