"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const SM_8_10_1 = require("../../fixtures/SM-8.10");
const _setup_1 = require("../../test-setup.js");
const test_1 = require("@playwright/test");
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
SM_8_10_1.test.describe('Cluster Management User Flow Tests', () => {
    const defaultTags = ['dev', 'custom', 'stage', 'prod', 'test'];
    const customPropertyDescription = 'This is the main integration environment for the Camunda Platform.';
    SM_8_10_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
        await navigationPage.goToClusters((testInfo.workerIndex + 1) * 1000);
    });
    SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
        await (0, _setup_1.captureScreenshot)(page, testInfo);
        await (0, _setup_1.captureFailureVideo)(page, testInfo);
    });
    (0, SM_8_10_1.test)('Custom Tags', async ({ clusterPage }) => {
        await SM_8_10_1.test.step('Ensure Custom Tags Appear in Cluster List', async () => {
            await clusterPage.assertCustomTagsAreVisible(defaultTags);
        });
        await SM_8_10_1.test.step('Ensure Custom Tags Appear in Cluster Details', async () => {
            await clusterPage.clickClusterLink();
            await clusterPage.assertCustomTagsAreVisible(defaultTags);
        });
    });
    (0, SM_8_10_1.test)('Custom Properties', async ({ clusterPage, clusterDetailsPage, page }) => {
        await SM_8_10_1.test.step('Navigate to Cluster Details', async () => {
            await clusterPage.clickClusterLink();
        });
        await SM_8_10_1.test.step('Ensure Custom Properties Appear in Modeler and Navigates Links', async () => {
            await (0, test_1.expect)(clusterDetailsPage.customPropertiesHeading).toBeVisible({
                timeout: 60000,
            });
            await (0, test_1.expect)(page.getByText(customPropertyDescription)).toBeVisible({
                timeout: 60000,
            });
            await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 1', 'Camunda', /^https:\/\/(www\.)?camunda\.com\/?$/);
            await clusterDetailsPage.assertCustomPropertyIsNavigated('Link 2', 'Camunda Docs', 'https://docs.camunda.io');
        });
    });
});
