"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const test_1 = require("@playwright/test");
const _8_9_1 = require("../../fixtures/8.9");
const _setup_1 = require("../../test-setup.js");
const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
const users_1 = require("../../utils/users");
const testUser = (0, users_1.getTestUser)('twentyFirstUser');
_8_9_1.test.describe.configure({ mode: 'parallel' });
_8_9_1.test.describe('Navigation Tests', () => {
    const clusterName = 'Test Cluster';
    _8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
        await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
    });
    _8_9_1.test.afterEach(async ({ page }, testInfo) => {
        await (0, _setup_1.captureScreenshot)(page, testInfo);
        await (0, _setup_1.captureFailureVideo)(page, testInfo);
    });
    (0, _8_9_1.test)('Navigate to Web Modeler', async ({ appsPage, modelerHomePage }) => {
        await appsPage.clickCamundaApps();
        await appsPage.clickModeler();
        await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
            timeout: 120000,
        });
    });
    (0, _8_9_1.test)('Navigate to Console', async ({ appsPage, homePage }) => {
        await appsPage.clickCamundaApps();
        await appsPage.clickConsoleLink();
        await (0, test_1.expect)(homePage.consoleBanner).toBeVisible({ timeout: 120000 });
    });
    (0, _8_9_1.test)('Navigate to Operate', async ({ appsPage, operateHomePage }) => {
        await appsPage.clickCamundaApps();
        await appsPage.clickOperate(clusterName);
        await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({ timeout: 120000 });
    });
    (0, _8_9_1.test)('Navigate to Optimize', async ({ appsPage, optimizeHomePage }) => {
        await appsPage.clickCamundaApps();
        await appsPage.clickOptimize(clusterName);
        await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
            timeout: 120000,
        });
    });
    (0, _8_9_1.test)('Navigate to Tasklist', async ({ appsPage, taskPanelPage }) => {
        await appsPage.clickCamundaApps();
        await appsPage.clickTasklist(clusterName);
        await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
            timeout: 120000,
        });
    });
    (0, _8_9_1.test)('Navigate to Admin', async ({ appsPage, ocIdentityHomePage }) => {
        await appsPage.clickCamundaApps();
        await appsPage.clickAdmin(clusterName);
        await (0, test_1.expect)(ocIdentityHomePage.adminBanner).toBeVisible({ timeout: 120000 });
    });
});
