cumulocity-cypress
Version:
Cypress commands for Cumulocity IoT
37 lines (36 loc) • 2.02 kB
TypeScript
export {};
declare global {
namespace Cypress {
interface Chainable {
/**
* Hides the Cumulocity cookie banner by accepting all cookies. See `acceptCookieBanner`.
* @deprecated Use `acceptCookieBanner` instead.
*/
hideCookieBanner(): Chainable<void>;
/**
* Accept the cookie banner with the provided configuration for current, functional and marketing cookies.
* As the cookie banner requires the cookie set to match the current policy version, accepting the cookie
* banner adds an interception for the public options to get the current policy version. Make sure to call
* this command before visiting the page. `cy.login` will call this command automatically with the
* default values. If the cookie banner has been accepted or hidden using `acceptCookieBanner` or `hideCookieBanner`,
* you can reset it by calling `showCookieBanner`.
*
* To fully disable the cookie banner, you can use `cy.disableCookieBanner`. This will not set the required
* cookies, but instead disable the cookie banner completely.
*/
acceptCookieBanner(required: boolean, functional: boolean, marketing: boolean): Chainable<void>;
/**
* Disables the cookie banner without setting any cookies. This will disable the cookie banner completely.
* Use if you want to disable the cookie banner for all policy versions. See `acceptCookieBanner` for more
* information.
* @see acceptCookieBanner
*/
disableCookieBanner(): Chainable<void>;
/**
* Ensure the cookie banner is shown on visit. If the cookie banner has been
* accepted or hidden using `acceptCookieBanner` or `hideCookieBanner`, it will be reset.
*/
showCookieBanner(): Chainable<void>;
}
}
}