"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = void 0;
const test_1 = require("@playwright/test");
const playwright_1 = __importDefault(require("@axe-core/playwright"));
const LoginPage_1 = require("../pages/SM-8.6/LoginPage");
const HomePage_1 = require("../pages/SM-8.6/HomePage");
const NavigationPage_1 = require("../pages/SM-8.6/NavigationPage");
const ModelerHomePage_1 = require("../pages/SM-8.6/ModelerHomePage");
const ModelerCreatePage_1 = require("../pages/SM-8.6/ModelerCreatePage");
const PlayPage_1 = require("../pages/SM-8.6/PlayPage");
const TaskPanelPage_1 = require("../pages/SM-8.6/TaskPanelPage");
const TaskDetailsPage_1 = require("../pages/SM-8.6/TaskDetailsPage");
const OperateHomePage_1 = require("../pages/SM-8.6/OperateHomePage");
const OperateProcessesPage_1 = require("../pages/SM-8.6/OperateProcessesPage");
const OperateProcessInstancePage_1 = require("../pages/SM-8.6/OperateProcessInstancePage");
const OptimizeCollectionsPage_1 = require("../pages/SM-8.6/OptimizeCollectionsPage");
const OptimizeHomePage_1 = require("../pages/SM-8.6/OptimizeHomePage");
const FormJsPage_1 = require("../pages/SM-8.6/FormJsPage");
const OptimizeReportPage_1 = require("../pages/SM-8.6/OptimizeReportPage");
const ConsoleOrganizationPage_1 = require("../pages/SM-8.6/ConsoleOrganizationPage");
const SettingsPage_1 = require("../pages/SM-8.6/SettingsPage");
const ConnectorSettingsPage_1 = require("../pages/SM-8.6/ConnectorSettingsPage");
const ConnectorMarketplacePage_1 = require("../pages/SM-8.6/ConnectorMarketplacePage");
const IdentityPage_1 = require("../pages/SM-8.6/IdentityPage");
const ConsoleHomePage_1 = require("../pages/SM-8.6/ConsoleHomePage");
const OptimizeDashboardPage_1 = require("../pages/SM-8.6/OptimizeDashboardPage");
const TaskProcessesPage_1 = require("../pages/SM-8.6/TaskProcessesPage");
const IdentityUsersPage_1 = require("../pages/SM-8.6/IdentityUsersPage");
const IdentityTenantPage_1 = require("../pages/SM-8.6/IdentityTenantPage");
const ConnectorTemplatePage_1 = require("../pages/SM-8.6/ConnectorTemplatePage");
const KeycloakLoginPage_1 = require("../pages/SM-8.6/KeycloakLoginPage");
const KeycloakAdminPage_1 = require("../pages/SM-8.6/KeycloakAdminPage");
const loggingUtils_1 = require("../utils/loggingUtils");
const test = test_1.test.extend({
    makeAxeBuilder: async ({ page }, use) => {
        const makeAxeBuilder = () => new playwright_1.default({ page }).withTags([
            'best-practice',
            'wcag2a',
            'wcag2aa',
            'cat.semantics',
            'cat.forms',
        ]);
        await use(makeAxeBuilder);
    },
    loginPage: async ({ page }, use) => {
        await use(new LoginPage_1.LoginPage(page));
    },
    homePage: async ({ page }, use) => {
        await use(new HomePage_1.HomePage(page));
    },
    navigationPage: async ({ page }, use) => {
        await use(new NavigationPage_1.NavigationPage(page));
    },
    modelerHomePage: async ({ page }, use) => {
        await use(new ModelerHomePage_1.ModelerHomePage(page));
    },
    modelerCreatePage: async ({ page }, use) => {
        await use(new ModelerCreatePage_1.ModelerCreatePage(page));
    },
    playPage: async ({ page }, use) => {
        await use(new PlayPage_1.PlayPage(page));
    },
    taskPanelPage: async ({ page }, use) => {
        await use(new TaskPanelPage_1.TaskPanelPage(page));
    },
    taskDetailsPage: async ({ page }, use) => {
        await use(new TaskDetailsPage_1.TaskDetailsPage(page));
    },
    operateHomePage: async ({ page }, use) => {
        await use(new OperateHomePage_1.OperateHomePage(page));
    },
    operateProcessesPage: async ({ page }, use) => {
        await use(new OperateProcessesPage_1.OperateProcessesPage(page));
    },
    operateProcessInstancePage: async ({ page }, use) => {
        await use(new OperateProcessInstancePage_1.OperateProcessInstancePage(page));
    },
    optimizeCollectionsPage: async ({ page }, use) => {
        await use(new OptimizeCollectionsPage_1.OptimizeCollectionsPage(page));
    },
    optimizeHomePage: async ({ page }, use) => {
        await use(new OptimizeHomePage_1.OptimizeHomePage(page));
    },
    formJsPage: async ({ page }, use) => {
        await use(new FormJsPage_1.FormJsPage(page));
    },
    optimizeReportPage: async ({ page }, use) => {
        await use(new OptimizeReportPage_1.OptimizeReportPage(page));
    },
    consoleOrganizationsPage: async ({ page }, use) => {
        await use(new ConsoleOrganizationPage_1.ConsoleOrganizationPage(page));
    },
    settingsPage: async ({ page }, use) => {
        await use(new SettingsPage_1.SettingsPage(page));
    },
    connectorSettingsPage: async ({ page }, use) => {
        await use(new ConnectorSettingsPage_1.ConnectorSettingsPage(page));
    },
    connectorMarketplacePage: async ({ page }, use) => {
        await use(new ConnectorMarketplacePage_1.ConnectorMarketplacePage(page));
    },
    identityPage: async ({ page }, use) => {
        await use(new IdentityPage_1.IdentityPage(page));
    },
    consoleHomePage: async ({ page }, use) => {
        await use(new ConsoleHomePage_1.ConsoleHomePage(page));
    },
    optimizeDashboardPage: async ({ page }, use) => {
        await use(new OptimizeDashboardPage_1.OptimizeDashboardPage(page));
    },
    taskProcessesPage: async ({ page }, use) => {
        await use(new TaskProcessesPage_1.TaskProcessesPage(page));
    },
    identityUsersPage: async ({ page }, use) => {
        await use(new IdentityUsersPage_1.IdentityUsersPage(page));
    },
    identityTenantPage: async ({ page }, use) => {
        await use(new IdentityTenantPage_1.IdentityTenantPage(page));
    },
    connectorTemplatePage: async ({ page }, use) => {
        await use(new ConnectorTemplatePage_1.ConnectorTemplatePage(page));
    },
    keycloakLoginPage: async ({ page }, use) => {
        await use((0, loggingUtils_1.withLogging)(new KeycloakLoginPage_1.KeycloakLoginPage(page), 'KeycloakLoginPage'));
    },
    keycloakAdminPage: async ({ page }, use) => {
        await use((0, loggingUtils_1.withLogging)(new KeycloakAdminPage_1.KeycloakAdminPage(page), 'KeycloakAdminPage'));
    },
    overrideTrackingScripts: [
        async ({ context }, use) => {
            await context.route('https://cmp.osano.com/16CVvwSNKHi9t1grQ/9403708a-488b-4f3b-aea6-613825dec79f/osano.js', (route) => route.fulfill({
                status: 200,
                headers: {
                    'Content-Type': 'text/javascript;charset=UTF-8',
                },
                body: '',
            }));
            await use();
        },
        {
            auto: true,
        },
    ],
});
exports.test = test;
