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

codeceptjs-applitoolshelper

v1.4.6

Published

Applitools helper for Codecept JS tests

Downloads

58

Readme

"Buy Me A Coffee"

Acceptance Tests Publish npm Package

NPM

codeceptjs-applitoolshelper

Integration of Applitools with CodeceptJS.

The codeceptjs-applitoolshelper is a CodeceptJS helper designed to publish test results on Applitools after test execution.

Installation

npm i codeceptjs-applitoolshelper --save
npm i webdriverio@5 --save

Configuration

Add the helper to codecept.conf.ts:

helpers: {
  Playwright: {
    // ... Playwright configuration
  },
  ApplitoolsHelper: {
    require: 'codeceptjs-applitoolshelper', 
    apiKey: 'YOUR_API_KEY',
    debug: true // enable verbose log
    // ... other configuration options
  },
}

| Key | Description | |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | apiKey | (Required) API key found under the user menu on the right-hand side of the test manager toolbar. | | windowSize | (Optional) Window size, e.g., 1440x700. If not provided, the default 1920x600 is used. The window size follows this precedence: ApplitoolsHelper, Webdriver. | | appName | (Optional) Desired application name. If not provided, the default 'Application Under Test' is used. | | batchInfo | (Optional) Desired batch info. If not provided, the default 'Visual Tests with the Classic Runner' is used. | | debug | (Optional) Enable verbose log. |

Usage Example

const { I } = inject();

Feature('Applitools functionality');

Scenario('Check home page @test', async () => {
    I.amOnPage('https://applitools.com/helloworld');
    await I.eyeCheck({ pageName: 'Homepage' });
});

Scenario('Check a CTA button on home page @test', async () => {
    const targetElement = 'div.section.button-section > button';
    I.amOnPage('https://applitools.com/helloworld');
    await I.eyeCheck({ pageName: 'CTA button', element: targetElement });
});

// Additional scenarios...

Test Results

  • Passed Test:

    CodeceptJS v3.5.11 #StandWithUkraine
    ...
    Applitools functionality --
    [1]  Starting recording promises
    Check home page @test
    I am on page "https://applitools.com/helloworld"
    I eye check {"pageName":"Homepage"}
    ✔ OK in 17113ms
    ...
  • Failed Test:

    CodeceptJS v3.5.11 #StandWithUkraine
    ...
    Applitools functionality --
        [1]  Starting recording promises
        Check home page @test
        I am on page "https://applitools.com/helloworld"
        I eye check {"pageName":"Homepage"}
        I am on page "https://google.com"
        ...
        ✖ FAILED in 43435ms
      
    -- FAILURES:
    
    1) Applitools functionality
         Check home page @test:
       Test 'Homepage' of 'Application Under Test' detected differences! See details at: https://eyes.applitools.com/app/batches/xxxx/xxxx?accountId=xxxx
        at ClassicRunner.getAllTestResults (node_modules/@applitools/eyes-api/dist/Runners.js:64:23)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async Test.<anonymous> (applitools_test.ts:9:5)
      
    Scenario Steps:
    - I.eyeCheck({"pageName":"Homepage"}) at Test.<anonymous> (./applitools_test.ts:9:13)
    - I.amOnPage("https://google.com") at Test.<anonymous> (./applitools_test.ts:8:7)
    - I.eyeCheck({"pageName":"Homepage"}) at Test.<anonymous> (./applitools_test.ts:7:13)
    - I.amOnPage("https://applitools.com/helloworld") at Test.<anonymous> (./applitools_test.ts:6:7)
      
    Artifacts:
    - screenshot: /Users/t/Desktop/projects/applitools-example/output/[email protected]
        ...

Example Repo

Explore the functionalities with the example repository.