"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/8.9/LoginPage");
const HomePage_1 = require("../pages/8.9/HomePage");
const ClusterPage_1 = require("../pages/8.9/ClusterPage");
const AppsPage_1 = require("../pages/8.9/AppsPage");
const ModelerHomePage_1 = require("../pages/8.9/ModelerHomePage");
const ModelerCreatePage_1 = require("../pages/8.9/ModelerCreatePage");
const TaskPanelPage_1 = require("../pages/8.9/TaskPanelPage");
const TaskDetailsPage_1 = require("../pages/8.9/TaskDetailsPage");
const OperateHomePage_1 = require("../pages/8.9/OperateHomePage");
const OperateProcessesPage_1 = require("../pages/8.9/OperateProcessesPage");
const ClusterDetailsPage_1 = require("../pages/8.9/ClusterDetailsPage");
const OperateProcessInstancePage_1 = require("../pages/8.9/OperateProcessInstancePage");
const OptimizeCollectionsPage_1 = require("../pages/8.9/OptimizeCollectionsPage");
const OptimizeHomePage_1 = require("../pages/8.9/OptimizeHomePage");
const FormJsPage_1 = require("../pages/8.9/FormJsPage");
const OptimizeReportPage_1 = require("../pages/8.9/OptimizeReportPage");
const ConsoleOrganizationPage_1 = require("../pages/8.9/ConsoleOrganizationPage");
const SettingsPage_1 = require("../pages/8.9/SettingsPage");
const ConnectorSettingsPage_1 = require("../pages/8.9/ConnectorSettingsPage");
const ClusterSecretsPage_1 = require("../pages/8.9/ClusterSecretsPage");
const TaskProcessesPage_1 = require("../pages/8.9/TaskProcessesPage");
const OptimizeDashboardPage_1 = require("../pages/8.9/OptimizeDashboardPage");
const ConnectorMarketplacePage_1 = require("../pages/8.9/ConnectorMarketplacePage");
const ModelerUserInvitePage_1 = require("../pages/8.9/ModelerUserInvitePage");
const SignUpPage_1 = require("../pages/8.9/SignUpPage");
const PlayPage_1 = require("../pages/8.9/PlayPage");
const ConnectorTemplatePage_1 = require("../pages/8.9/ConnectorTemplatePage");
const IdpCreatePage_1 = require("../pages/8.9/IdpCreatePage");
const OCIdentityGroupsPage_1 = require("../pages/8.9/OCIdentityGroupsPage");
const OCIdentityHomePage_1 = require("../pages/8.9/OCIdentityHomePage");
const OCIdentityMappingRulesPage_1 = require("../pages/8.9/OCIdentityMappingRulesPage");
const OCIdentityRolesPage_1 = require("../pages/8.9/OCIdentityRolesPage");
const OCIdentityAuthorizationsPage_1 = require("../pages/8.9/OCIdentityAuthorizationsPage");
const OCIdentityClusterVariablesPage_1 = require("../pages/8.9/OCIdentityClusterVariablesPage");
const ClientCredentialsDetailsPage_1 = require("../pages/8.9/ClientCredentialsDetailsPage");
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));
    },
    clusterPage: async ({ page }, use, testInfo) => {
        const clusterPage = new ClusterPage_1.ClusterPage(page, testInfo);
        await use(clusterPage);
    },
    appsPage: async ({ page }, use) => {
        await use(new AppsPage_1.AppsPage(page));
    },
    modelerHomePage: async ({ page }, use) => {
        await use(new ModelerHomePage_1.ModelerHomePage(page));
    },
    modelerCreatePage: async ({ page }, use) => {
        await use(new ModelerCreatePage_1.ModelerCreatePage(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));
    },
    ocIdentityHomePage: async ({ page }, use) => {
        await use(new OCIdentityHomePage_1.OCIdentityHomePage(page));
    },
    ocIdentityMappingRulesPage: async ({ page }, use) => {
        await use(new OCIdentityMappingRulesPage_1.OCIdentityMappingRulesPage(page));
    },
    ocIdentityRolesPage: async ({ page }, use) => {
        await use(new OCIdentityRolesPage_1.OCIdentityRolesPage(page));
    },
    ocIdentityAuthorizationsPage: async ({ page }, use) => {
        await use(new OCIdentityAuthorizationsPage_1.OCIdentityAuthorizationsPage(page));
    },
    operateProcessesPage: async ({ page }, use) => {
        await use(new OperateProcessesPage_1.OperateProcessesPage(page));
    },
    clusterDetailsPage: async ({ page }, use) => {
        await use(new ClusterDetailsPage_1.ClusterDetailsPage(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));
    },
    clusterSecretsPage: async ({ page }, use) => {
        await use(new ClusterSecretsPage_1.ClusterSecretsPage(page));
    },
    taskProcessesPage: async ({ page }, use) => {
        await use(new TaskProcessesPage_1.TaskProcessesPage(page));
    },
    optimizeDashboardPage: async ({ page }, use) => {
        await use(new OptimizeDashboardPage_1.OptimizeDashboardPage(page));
    },
    connectorMarketplacePage: async ({ page }, use) => {
        await use(new ConnectorMarketplacePage_1.ConnectorMarketplacePage(page));
    },
    modelerUserInvitePage: async ({ page }, use) => {
        await use(new ModelerUserInvitePage_1.ModelerUserInvitePage(page));
    },
    signUpPage: async ({ page }, use) => {
        await use(new SignUpPage_1.SignUpPage(page));
    },
    playPage: async ({ page }, use) => {
        await use(new PlayPage_1.PlayPage(page));
    },
    connectorTemplatePage: async ({ page }, use) => {
        await use(new ConnectorTemplatePage_1.ConnectorTemplatePage(page));
    },
    idpCreatePage: async ({ page }, use) => {
        await use(new IdpCreatePage_1.IdpCreatePage(page));
    },
    ocIdentityGroupsPage: async ({ page }, use) => {
        await use(new OCIdentityGroupsPage_1.OCIdentityGroupsPage(page));
    },
    ocIdentityClusterVariablesPage: async ({ page }, use) => {
        await use(new OCIdentityClusterVariablesPage_1.OCIdentityClusterVariablesPage(page));
    },
    clientCredentialsDetailsPage: async ({ page }, use) => {
        await use(new ClientCredentialsDetailsPage_1.ClientCredentialsDetailsPage(page));
    },
    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 context.route('https://cmp.osano.com/16CVvwSNKHi9t1grQ/82b4a594-aa1b-41df-b4f1-fa858971ebe8/osano.js', (route) => route.fulfill({
                status: 200,
                headers: {
                    'Content-Type': 'text/javascript;charset=UTF-8',
                },
                body: '',
            }));
            await context.route('https://cmp.osano.com/16CVvwSNKHi9t1grQ/2ce963c0-31c9-4b54-b052-d66a2a948ccc/osano-ui.js', (route) => route.fulfill({
                status: 200,
                headers: {
                    'Content-Type': 'text/javascript;charset=UTF-8',
                },
                body: '',
            }));
            await use();
        },
        {
            auto: true,
        },
    ],
});
exports.test = test;
