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