m3-academy-template-vtexio-.../tests/cypress/support/vtex.js
Caroline Moran f2a03c53ae first commit
2022-08-11 09:06:07 -04:00

10 lines
307 B
JavaScript

function setVtexIdCookie() {
const cookieOptions = {
domain: `.${new URL(Cypress.config().baseUrl).hostname}`,
};
const token = Cypress.env("authToken");
return cy.setCookie("VtexIdclientAutCookie", token, cookieOptions);
}
Cypress.Commands.add("setVtexIdCookie", setVtexIdCookie);