Cypress commands and utilities for Custom Applications.


yarn add @commercetools-frontend/cypress
# or
npm --save install @commercetools-frontend/cypress


This package extends Cypress' cy command.

Define the task in the plugins file:

const customApplications = require('@commercetools-frontend/cypress/task');
module.exports = (on, config) => {
on('task', {

Extend the Cypress commands:

import '@commercetools-frontend/cypress/add-commands';


  • cy.loginByOidc({ entryPointUriPath })

    This command performs the user login using the OpenID Connect (OIDC) workflow to retrieve the session token.
    The command also requires to load the custom-application-config.json (automatically done via the Cypress task) and therefore it may need to load environment variables in case the application config uses environment placeholders.
    By default, the .env and .env.local files are attempted to be loaded from the application folder. You can pass a dotfiles option to pass a list of names/paths relative to the application folder in case the files in the project have a different name/location.

    The command also requires the following environment variables to be available: PROJECT_KEY, LOGIN_USER, LOGIN_PASSWORD.