22 lines
509 B
JavaScript
22 lines
509 B
JavaScript
import "./user";
|
|
import "./softAsserations";
|
|
import "./customer";
|
|
import "./shippingMethod";
|
|
|
|
Cypress.Commands.add("clearSessionData", () => {
|
|
// Because of known cypress bug, not all local storage data are cleared.
|
|
// Here is workaround to ensure tests have no side effects.
|
|
// Suggested usage:
|
|
|
|
// beforeEach(() => {
|
|
// cy.clearSessionData();
|
|
// });
|
|
|
|
cy.clearCookies();
|
|
cy.clearLocalStorage();
|
|
cy.visit("/", {
|
|
onBeforeLoad: win => {
|
|
win.sessionStorage.clear();
|
|
}
|
|
});
|
|
});
|