@applitools/eyes-cypress
TypeScript icon, indicating that this package has built-in type declarations

3.52.0 • Public • Published

Applitools Eyes SDK for Cypress

The Cypress SDK allows you to leverage the Applitools Ultrafast Grid to automatically run tests across all major browsers.

For general information about working with Cypress, see Cypress Testing Framework on the Applitools website.

Installing Eyes Cypress

Run the following

npm i --save @applitools/eyes-cypress

or

yarn add @applitools/eyes-cypress

Setting up the project

On the project, run the following:

npx eyes-setup

Modifying the configuration file

If npx eyes-setup did not run successfully, modify the configuration file as follows:

Cypress version 10 or later

Add the following to the cypress.config.js file:

const { defineConfig } = require('cypress')
const eyesPlugin = require('@applitools/eyes-cypress')
module.exports = eyesPlugin(defineConfig({
  // the e2e or component configuration
  e2e: {
    setupNodeEvents(on, config) {
    }
  }
}))

Cypress version earlier than version 10:

In the pluginsFile file, add the following after the definition of module.exports:

require('@applitools/eyes-cypress')(module)

IntelliSense code completion

You can add Eyes-Cypress IntelliSense to your tests using one of the following methods:

Triple slash directives {#slash}

The simplest way to see IntelliSense when typing an Eyes-Cypress command is to add a triple-slash directive to the head of your JavaScript or TypeScript testing file. This will turn the IntelliSense on a per file basis:

  /// <reference types="@applitools/eyes-cypress" />

Reference type declarations via tsconfig {#reference}

Eyes-Cypress ships with official type declarations for TypeScript. This allows you to add eyes commands to your TypeScript tests. If you do not have TypeScript, for example you use JavaScript, you can add IntelliSense declarations to the project using one of the following:

{
  "compileroptions": {
    "types": ["@applitools/eyes-cypress", "cypress", "node"]
   }
}
  • In the cypress/support folder, create a file index.d.ts that contains:
import "@applitools/eyes-cypress"

Normally, this is cypress/plugins/index.js. For details, see the Cypress documentation.

Configure custom commands manually

Eyes-Cypress exposes new commands to your tests. This means that additional methods will be available on the cy object. If npx eyes-setup does not work, you need to configure these custom commands. As with the plugin, there is no automatic way to configure this in Cypress, so you need to manually add the following code to your supportFile:

import '@applitools/eyes-cypress/commands'

Entering the Applitools API key{#API}

To authenticate via the Applitools server and run tests, you need to set the environment variable APPLITOOLS_API_KEY to the API key provided from Applitools Eyes. For details how to retrieve your API key, see the Applitools documentation.

Entering the API Key on Linux or a Mac

export APPLITOOLS_API_KEY=<API_key>
npx cypress open

Entering the API Key on Windows

set APPLITOOLS_API_KEY=<API_key>
npx cypress open

Eyes server URL {#URL}

If the Eyes server is not deployed in https://eyes.applitools.com, you need to set the Server URL in the environment variable APPLITOOLS_SERVER_URL before running tests.

The server URL of your Applitools Eyes dashboard is in the format https://<MY_COMPANY>.applitools.com

Entering the server URL on Linux or a Mac

export APPLITOOLS_SERVER_URL=<YOUR_SERVER_URL>

Entering the server URL on Windows

set APPLITOOLS_SERVER_URL=<YOUR_SERVER_URL>

Further information

For further information, see:

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.52.04,362latest
3.24.0-beta.74beta

Version History

VersionDownloads (Last 7 Days)Published
3.52.04,362
3.51.0575
3.50.33,921
3.50.22,390
3.50.1531
3.50.044
3.49.360
3.49.2148
3.49.13,573
3.49.029
3.48.17,870
3.48.01
3.47.1560
3.47.053
3.46.01,615
3.45.211
3.45.10
3.45.03,597
3.44.93,827
3.44.82
3.44.7189
3.44.61,749
3.44.5161
3.44.4243
3.44.21
3.44.11
3.44.014
3.43.166
3.42.38
3.42.0251
3.41.01
3.40.7119
3.40.6869
3.40.5185
3.40.416
3.40.30
3.40.24
3.40.113
3.40.019
3.39.125
3.39.00
3.38.01,074
3.37.020
3.36.275
3.36.11
3.36.01
3.35.10
3.35.00
3.34.14
3.34.00
3.33.1100
3.33.01
3.32.23
3.32.1373
3.32.02
3.31.10
3.31.02
3.30.23
3.30.112
3.30.01
3.29.141
3.29.01
3.28.30
3.28.23
3.28.116
3.28.02
3.27.92
3.27.825
3.27.72
3.27.650
3.27.53
3.27.42
3.27.34
3.27.240
3.27.167
3.27.02
3.26.65
3.26.53
3.26.42
3.26.3384
3.26.2132
3.26.14
3.26.02
3.25.76
3.25.64
3.25.55
3.25.43
3.25.33
3.25.23
3.25.12
3.25.02
3.24.0-beta.74
3.24.0-beta.63
3.24.0-beta.52
3.24.0-beta.42
3.24.0-beta.32
3.24.0-beta.22
3.24.0-beta.13
3.24.0-beta.02
3.23.92
3.23.82
3.23.73
3.23.62
3.23.5123
3.23.43
3.23.310
3.23.23
3.23.12
3.23.02
3.22.8101
3.22.72
3.22.6173
3.22.51,973
3.22.49
3.22.310
3.22.24
3.22.13
3.22.014
3.21.118
3.21.07
3.20.411
3.20.32
3.20.22
3.20.12
3.20.02
3.19.12
3.19.03
3.18.72,586
3.18.62
3.18.53
3.18.47
3.18.33
3.18.22
3.18.12
3.18.02
3.17.02
3.16.42
3.16.32
3.16.22
3.16.12
3.16.02
3.15.57
3.15.42
3.15.32
3.15.22
3.15.12
3.15.03
3.14.02
3.13.43
3.13.3188
3.13.23
3.13.13
3.13.02
3.12.52
3.12.42
3.12.32
3.12.22
3.12.13
3.12.0511
3.11.17
3.11.02
3.10.52
3.10.45
3.10.32
3.10.22
3.10.13
3.10.02
3.9.212
3.9.204
3.9.192
3.9.182
3.9.172
3.9.163
3.9.152
3.9.144
3.9.132
3.9.11-beta.82
3.9.11-beta.72
3.9.11-beta.62
3.9.11-beta.53
3.9.11-beta.43
3.9.11-beta.32
3.9.11-beta.22
3.9.11-beta.12
3.9.112
3.9.103
3.9.92
3.9.82
3.9.72
3.9.62
3.9.52
3.9.42
3.9.32
3.9.22
3.8.222
3.9.12
3.8.213
3.8.202
3.8.192
3.8.182
3.8.143
3.8.132
3.8.122
3.8.113
3.8.102
3.8.93
3.8.83
3.8.72
3.8.63
3.8.52
3.8.42
3.8.32
3.8.22
3.8.13
3.7.591
3.7.42
3.7.35
3.7.22
3.7.12
3.6.512
3.6.503
3.6.492
3.6.482
3.6.472
3.6.462
3.6.452
3.6.443
3.6.432
3.6.422
3.6.412
3.6.405
3.6.393
3.6.383
3.6.372
3.6.362
3.6.353
3.6.342
3.6.332
3.6.322
3.6.312
3.6.302
3.6.283
3.6.273
3.6.262
3.6.252
3.6.243
3.6.232
3.6.222
3.6.212
3.6.207
3.6.192
3.6.182
3.6.172
3.6.162
3.6.153
3.6.142
3.6.132
3.6.122
3.6.114
3.6.104
3.6.92
3.6.82
3.6.74
3.5.6-autodesk2
3.6.62
3.6.52
3.6.42
3.5.5-autodesk3
3.6.33
3.6.22
3.5.4-autodesk2
3.6.12
3.5.62
3.5.52
3.5.3-autodesk3
3.5.43
3.5.2-autodesk3
3.5.22
3.5.12
3.4.1211

Package Sidebar

Install

npm i @applitools/eyes-cypress

Weekly Downloads

45,862

Version

3.52.0

License

SEE LICENSE IN LICENSE

Unpacked Size

523 kB

Total Files

76

Last publish

Collaborators

  • danielputerman
  • gearm
  • amitzur
  • ramapplitools
  • amit.rokach
  • roy.sela
  • applitools-admin
  • applitools-readonly
  • iasisapp
  • noam.mendel
  • arik-applitools
  • yotammadem
  • denis.styrt
  • kyrylo.onufriiev
  • amitzur-applitools
  • yardenw.applitools
  • ormeda
  • vgprod
  • clementbarry
  • gofilord
  • alex.burdeynyy
  • chaimaharonson
  • ronikar_applitools
  • benny.halberstadt
  • itaibh-applitools
  • grayscale64
  • fatihsolhan-applitools
  • itaiz134
  • dockermaster
  • anandbagmar
  • sergovapplitools
  • eirenik0
  • mmilapp
  • noam.gaash
  • roeefr
  • livgerti
  • netta.bondy
  • anastasia.koifman
  • mkowalew3382
  • noamshv
  • aretm_borodavka
  • amir.groisman
  • netaavivi
  • shai.shlomai
  • adamcarmi
  • movsho
  • shirbin