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

@commercetools-frontend/cypress-cookie-consent

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-frontend/cypress-cookie-consent

Cypress package to set a cookie consent cookie

  • 1.0.31
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
635
decreased by-23.86%
Maintainers
0
Weekly downloads
 
Created
Source

This package allows to set a cookie consent cookie using the @commercetools-frontend/cypress-cookie-consent package.

Installation

$ npm install --save @commercetools-frontend/cypress-cookie-consent

Usage

You need to extend your Cypress commands. You might have an e2e.ts file containing your library and custom commands. If so add this to it:

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

This will register a setConsentCookie on Cypress which you can invoke as cy.setConsentCookie. It accepts an argument called commandOptions which has a property named consentGroups. The consent groups are the groups you want to give consent for, for your Cypress test. So in summary you may call it as:

cy.setConsentCookie({
  consentGroups: {
    essentialCookies: true,
    performanceCookies: true,
    functionalCookies: true,
    targetingCookies: true,
    socialMediaCookies: true,
  },
});

FAQs

Package last updated on 28 Oct 2024

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