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

worthy-applitools

v3.5.21

Published

Applitools visual tests

Downloads

7

Readme

Applitools - cross browsers visual tests

Description:

This is an npm package for creating visual/UI tests with applitools, selenium and mocha, but only after installing the worthy-selenium-webdriver or having infrastructure for webdriver.

First what is applitools?

Applitools was founded by software developers on a mission to shorten the release cycles of their product Despite having good unit test coverage and automated end-to-end functional tests, to have a full automated regression of the UI, covering multiple operating systems, web browsers, screen resolutions, and localizations.

Applitools provides service to automate all the visual tests including running on several devices and browsers.

Basically it renders the application dom and captures a screenshot while comparing it to the original baseline.

Notify when a difference between the 2 screenshots appear.

Why as NPM package?

The goal is to implement this tool in any service that requiers visual test, create an isolated tests for each service.

Caveat

Aplitools capture a screenshot of the application after it renders the dom application on several devices, which means the tests takes time.

Installation

npm install worthy-applitools
  • In order to create applitools tests you have to have worthy-selenium-webdriver package already installed.

  • for the structure of the tests

    npm install mocha

Usage

  1. SetUp.test.ts -

    Optional - this is a commented class that can help you set the setup test class easily.

    Set up basic configuration for running an applitools test, this class uses methods from the applitools base class.

    Like setting the visual grid runner for running the tests on different browsers and devices, set the eyes object and etc.

    For examples and docs go to -> https://applitools.com/docs/api/eyes-sdk/classes-gen/class_visualgridrunner/method-visualgridrunner-visualgridrunner-selenium-java.html

  2. ApplitoolsBase.ts -

    a. Eyes -

    This method set the eyes object for using the methods of the eyes.

    getAndSetEyes();

    After you set the eyes object you use eyes open to open the connection to applitools inside your

    test

    Call this method at the beggining of your test before calling any of the check methods.

    await eyesOpen();

    b. getRunner - Use this method to create a runner that manages tests of the Ultrafast Grid to render screenshots. Pass this object to each Eyes constructor.

    let runner = getRunner();
    eyes = new Eyes(runner);

    c. getConfiguration - Use this method to configure you confoguration for the test, set the application name, api key(applitools user id) and add several devices and borswers that the test will run on.

    d. closeEyes - This method close the eyes object - print errors when there are UI differences.

  3. EyesActions - 

    a. eyesCheck - create a check in your tests Calling this method renders the dom and capture the screenshot.

    Note: this must be called after eyesOpen();

    eyesCheck(whatIsTheCheck: string);