npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nemo-eyes

v1.0.0

Published

A [nemo](https://github.com/paypal/nemo) plugin for automated visual testing using [Applitools Eyes](https://applitools.com/).

Downloads

6

Readme

nemo-eyes

A nemo plugin for automated visual testing using Applitools Eyes.

Installation

  1. Add dependencies to package.json and install.
	...
    "nemo": "^1.0.0",
    "nemo-eyes": "^0.0.4",
	...
  1. Add nemo-eyes plugin to your nemo config JSON object. Also note eyes section under data
{
  "driver": {
    ...
  },
  "plugins": {
    "eyes": {
      "module": "path:../",
      "arguments": [
        {
          "sdk": {
            "setApiKey": "env:applitools_api_key",
            "setBatch": "desktop",
            "setForceFullPageScreenshot": true
          },
          "viewport": {
            "width": 1200,
            "height": 600
          },
          "mock": "env:applitools_mock"
        }
      ]
    }
  }
}

How to use

Once nemo-eyes plugin is registered, eyes namespace will be attached to nemo and methods for visual testing are exposed. Idea is to,

  1. Initialize your application and test using nemo.eyes.open('Sample Application','Homepage test');
  2. Trigger a visual check using nemo.eyes.checkWindow("PayPal Home Page");. If base image for the window in question is present, new screenshot will be compared against it. Otherwise new screenshot will be saved as a base image
  3. Close test and resolved promise will have corresponding results
    nemo.eyes.close().then( function(testResults){
        console.log(testResults.isPassed);
        console.log(testResults.url);
    });

Configuration

Configure nemo-eyes via the arguments section in the plugin configuration as above.

For any Eyes SDK method that can takes string arguments, you can program the Eyes SDK via the sdk section of the arguments object.

If you supply "mock": true or "mock": "true" via the config (as shown above), you can run your scripts without having to duck-type around the eyes calls in your script. This is handy if you're working on other aspects of your script and do not want to incur cost or any latency associated with calling out to Applitools.

Running a sample visual test using Applitools.

  1. In order to run a test you need to have an Applitools account (free track is available).
  2. Copy your API key from the tutorial page (choose "Automated visual tests", then scroll down to step 4), and set it in nemo examples/config/config.json file.
  3. go to the repository's root folder and run node examples/eyesTest.js