Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detox-applitools-testing

Package Overview
Dependencies
Maintainers
5
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detox-applitools-testing

Utility to integrate applitools screenshot testing in your detox tests

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-5%
Maintainers
5
Weekly downloads
 
Created
Source

Detox Applitools Testing

Version Documentation Maintenance License: MIT

This is a helper project which allows you to add screeshot tests for your Detox tests using Applitools.

Install

npm install detox-applitools-testing

Setup

Inside your Detox entry (usually index.js file in e2e/index.js) add following lines:

import {setup} from 'detox-applitools-testing';

before(async () => {
  ...
  setup({
    apiKey: 'EYES_API_KEY', //Your key from applitools,
    appName: 'Your app Name',
    batchId: 'Unique batch number, can simply be uuid.v4()',
    serverUrl: 'applitools server url', //Optional, leave empty if not using custom server
    branchName: 'YourBranchName', //Optional, run tests in specific branch. Learn more: https://help.applitools.com/hc/en-us/articles/360007528631-Branches
    parentBranchName: 'YourParentBranchName', //Optional, compare tests against a specific baseline in a different branch. Learn more: https://help.applitools.com/hc/en-us/articles/360007528631-Branches 
  });
});

If you are using Jest, add this option to your Jest config to have faster global lookups (results in faster screenshot comparisons). Read more

"extraGlobals": ["Math"],

Usage

To use screenshot testing inside your tests:

import {testScreenshot} from 'detox-applitools-testing';

describe('...', await () => {

  it('...', () => {
    ...
    await testScreenshot('Unique test case');
  });

});

testScreenshot

await testScreenshot('NAME_OF_TEST', {
  ignoredTopHeight : 44, // Optional, pixels from top to ignore
  screenshotPath: 'YOUR_PATH', // Optional, by default screenshot is taken by Detox
});

By default testScreenshot cuts off top bar of the screenshot to hide the clock. You can disable it by using: testScreenshot('TEST_ID', {ignoredTopHeight: 0})

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

📝 License

This project is MIT licensed.

Keywords

FAQs

Package last updated on 15 Nov 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc