10 lines
307 B
JavaScript
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);
|