"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resetSessionAll = exports.resetSession = void 0;
async function resetSession(browser, page) {
    const context = browser.contexts()[0];
    await context.clearCookies();
    await page.reload();
    await page.waitForLoadState('domcontentloaded');
    await page.goto('/');
}
exports.resetSession = resetSession;
async function resetSessionAll(context, page) {
    await context.clearCookies();
    await context.clearPermissions();
    for (const page of context.pages()) {
        await page.evaluate(() => {
            localStorage.clear();
            sessionStorage.clear();
        });
    }
    await page.reload();
    await page.goto('/');
}
exports.resetSessionAll = resetSessionAll;
