"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 sleep_1 = require("../../utils/sleep");
const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
const users_1 = require("../../utils/users");
const mainUser = (0, users_1.getTestUser)('twentySixthUser');
_8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
    const clusterNames = {
        'RBA On User Flow - No User Permission': 'First RBA V2 Cluster',
        'RBA On User Flow - Permission for One Process': 'Second RBA V2 Cluster',
        'RBA On User Flow - Permission for All Processes with Full Permissions': 'Third RBA V2 Cluster',
        'RBA On User Flow - Permission for Selected Processes Only': 'Fourth RBA V2 Cluster',
    };
    _8_9_1.test.beforeEach(async ({ page, homePage, clusterPage, loginPage, clusterDetailsPage, appsPage }, testInfo) => {
        await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, mainUser, (testInfo.workerIndex + 1) * 1000);
        await (0, test_1.expect)(homePage.clusterTab).toBeVisible({ timeout: 120000 });
        await homePage.clickClusters();
        const clusterName = clusterNames[testInfo.title];
        (0, test_1.expect)(clusterName, `No cluster mapping for test title: "${testInfo.title}")`).toBeTruthy();
        await clusterPage.createClusterIfNotExists(clusterName);
        await (0, UtilitiesPage_1.disableRBA)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
    });
    _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)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, settingsPage, }, testInfo) => {
        _8_9_1.test.slow();
        const clusterName = clusterNames[testInfo.title];
        const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
        const processName = 'RBA_NO_PERM' + randomString;
        const process1 = processName + '1';
        const process2 = processName + '2';
        const role = `rbaNoPermission${randomString}`;
        const testUser = {
            username: process.env.C8_USERNAME_TEST_4,
            password: process.env.C8_PASSWORD_TEST_4,
        };
        await _8_9_1.test.step('Navigate to OC Identity and Assign User To A Role', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickAdmin(clusterName);
            await ocIdentityHomePage.clickRolesTab();
            await ocIdentityRolesPage.assignUserToRole(role, testUser.username);
        });
        await _8_9_1.test.step('Create Resource Authorization', async () => {
            await ocIdentityHomePage.clickAuthorizationsTab();
            await ocIdentityAuthorizationsPage.clickResourceTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.resourceCreateAuthorization)(role));
        });
        await _8_9_1.test.step('Create Component Authorization', async () => {
            await ocIdentityAuthorizationsPage.clickComponentTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.componentAccessAuthorization)(role));
        });
        await _8_9_1.test.step('Create Process Definition Authorizations For Both Processes', async () => {
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.processInstanceCreateAuthorization)(role, process1));
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.processInstanceCreateAuthorization)(role, process2));
        });
        await _8_9_1.test.step('Create Component Authorization', async () => {
            await ocIdentityAuthorizationsPage.clickAuthorizationTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.authorizationAllPermissions)(role));
        });
        await _8_9_1.test.step('Clear cookies and reset session', async () => {
            await page.context().clearCookies();
            await page.evaluate(() => {
                localStorage.clear();
                sessionStorage.clear();
            });
            await page.goto('/');
            await loginPage.loginWithTestUser(testUser);
        });
        await _8_9_1.test.step('Navigate to Web Modeler', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickModeler();
            await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
                timeout: 60000,
            });
        });
        await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
            await homePage.clickSkipCustomization();
            await modelerHomePage.createCrossComponentProjectFolder();
        });
        await _8_9_1.test.step('Create Two BPMN Diagrams with User Task and Start Process Instance', async () => {
            await (0, UtilitiesPage_1.runMultipleProcesses)(clusterName, page, modelerHomePage, modelerCreatePage, {
                processName: processName,
                uploadFromFile: 'Camunda_Simple_User_Task_1',
            });
        });
        await _8_9_1.test.step('Navigate to Console and Login as Admin User', async () => {
            //only admin users enable and disable RBA
            await appsPage.clickCamundaApps();
            await appsPage.clickConsoleLink();
            await settingsPage.clickOpenSettingsButton();
            await settingsPage.clickLogoutButton();
            await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, mainUser, 5000);
        });
        await _8_9_1.test.step('Admin Enables RBA', async () => {
            await (0, UtilitiesPage_1.enableAuthorizations)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
            await (0, sleep_1.sleep)(20000);
        });
        await _8_9_1.test.step('Login as Test User', async () => {
            await page.context().clearCookies();
            await page.evaluate(() => {
                localStorage.clear();
                sessionStorage.clear();
            });
            await page.goto('/');
            await loginPage.loginWithTestUser(testUser);
        });
        await _8_9_1.test.step('Navigate to Tasklist and Make Sure that the Two Deployed Processes Are Not Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickTasklist(clusterName);
            await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
                timeout: 60000,
            });
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.clickpopupContinueButton();
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process1, { shouldBeVisible: false });
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2, { shouldBeVisible: false });
        });
        await _8_9_1.test.step('Navigate to Operate and Make Sure that the Two Deployed Processes Are Not Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickOperate(clusterName);
            await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
                timeout: 30000,
            });
            await operateHomePage.clickProcessesTab();
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1, { shouldBeVisible: false });
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, { shouldBeVisible: false });
        });
    });
    (0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
        _8_9_1.test.slow();
        const clusterName = clusterNames[testInfo.title];
        const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
        const processName = 'RBA_ONE_PERM' + randomString;
        const process1 = processName + '1';
        const process2 = processName + '2';
        const role1 = `rbaOnePerm${randomString}1`;
        const role2 = `rbaOnePerm${randomString}2`;
        const testUser = {
            username: process.env.C8_USERNAME_TEST_6,
            password: process.env.C8_PASSWORD_TEST_6,
        };
        await _8_9_1.test.step('Navigate to OC Identity and Assign User To Two Roles', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickAdmin(clusterName);
            await ocIdentityHomePage.clickRolesTab();
            await ocIdentityRolesPage.assignUserToRole(role1, testUser.username);
            await ocIdentityHomePage.clickRolesTab();
            await ocIdentityRolesPage.assignUserToRole(role2, testUser.username);
        });
        await _8_9_1.test.step('Create Resource Authorization', async () => {
            await ocIdentityHomePage.clickAuthorizationsTab();
            await ocIdentityAuthorizationsPage.clickResourceTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.resourceCreateAuthorization)(role1));
        });
        await _8_9_1.test.step('Create Component Authorization For Both Roles', async () => {
            await ocIdentityAuthorizationsPage.clickComponentTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.componentAccessAuthorization)(role1));
            await ocIdentityAuthorizationsPage.clickComponentTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.componentAccessAuthorization)(role2));
        });
        await _8_9_1.test.step('Grant Process Definition Authorization for First Process', async () => {
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.processInstanceAllAuthorization)(role1, process1));
        });
        await _8_9_1.test.step('Grant Only Create Process Definition Authorization for Second Process', async () => {
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.processInstanceCreateAuthorization)(role1, process2));
        });
        await _8_9_1.test.step('Grant Role Authorization To Delete Role', async () => {
            await ocIdentityAuthorizationsPage.clickRoleTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.roleAllAuthorization)(role1));
        });
        await _8_9_1.test.step('Clear cookies and reset session', async () => {
            await page.context().clearCookies();
            await page.evaluate(() => {
                localStorage.clear();
                sessionStorage.clear();
            });
            await page.goto('/');
        });
        await _8_9_1.test.step('Login as Test User', async () => {
            await loginPage.loginWithTestUser(testUser);
        });
        await _8_9_1.test.step('Navigate to Web Modeler', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickModeler();
            await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
                timeout: 60000,
            });
        });
        await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
            await homePage.clickSkipCustomization();
            await modelerHomePage.createCrossComponentProjectFolder();
        });
        await _8_9_1.test.step('Create Two BPMN Diagrams with User Task and Start Process Instance', async () => {
            await (0, UtilitiesPage_1.runMultipleProcesses)(clusterName, page, modelerHomePage, modelerCreatePage, {
                processName: processName,
                uploadFromFile: 'Camunda_Simple_User_Task_2',
            });
        });
        await _8_9_1.test.step('Navigate to Console and Login as Admin User', async () => {
            //only admin users enable and disable RBA
            await appsPage.clickCamundaApps();
            await appsPage.clickConsoleLink();
            await settingsPage.clickOpenSettingsButton();
            await settingsPage.clickLogoutButton();
            await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, mainUser, 1000);
        });
        await _8_9_1.test.step('Admin Enables RBA', async () => {
            await (0, UtilitiesPage_1.enableAuthorizations)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
            await (0, sleep_1.sleep)(20000);
        });
        await _8_9_1.test.step('Login as Test User', async () => {
            await page.context().clearCookies();
            await page.evaluate(() => {
                localStorage.clear();
                sessionStorage.clear();
            });
            await page.goto('/');
            await loginPage.loginWithTestUser(testUser);
        });
        await _8_9_1.test.step('Navigate to Tasklist and Only First Process Is Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickTasklist(clusterName);
            await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
                timeout: 30000,
            });
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.clickpopupContinueButton();
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process1);
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2, {
                shouldBeVisible: false,
            });
        });
        await _8_9_1.test.step('Navigate to Operate and Only First Process Is Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickOperate(clusterName);
            await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
                timeout: 30000,
            });
            await operateHomePage.clickProcessesTab();
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1);
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, {
                shouldBeVisible: false,
            });
        });
        await _8_9_1.test.step('Navigate to OC Identity and Delete First Role', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickAdmin(clusterName);
            await ocIdentityHomePage.clickRolesTab();
            await ocIdentityRolesPage.deleteRole(role1);
            await (0, sleep_1.sleep)(5000);
        });
        await _8_9_1.test.step('Navigate to Operate and Check Processes Are Not Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickOperate(clusterName);
            await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
                timeout: 30000,
            });
            await operateHomePage.clickProcessesTab();
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1, {
                shouldBeVisible: false,
            });
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, {
                shouldBeVisible: false,
            });
        });
        await _8_9_1.test.step('Navigate to Tasklist and Check Processes Are Not Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickTasklist(clusterName);
            await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
                timeout: 30000,
            });
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.clickpopupContinueButton();
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process1, {
                shouldBeVisible: false,
            });
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2, {
                shouldBeVisible: false,
            });
        });
    });
    (0, _8_9_1.test)('RBA On User Flow - Permission for All Processes with Full Permissions', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, }, testInfo) => {
        _8_9_1.test.slow();
        const clusterName = clusterNames[testInfo.title];
        const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
        const processName = 'AFTER_RBA' + randomString;
        const process1 = processName + '1';
        const process2 = processName + '2';
        await _8_9_1.test.step('Navigate to Console and Enable RBA', async () => {
            await (0, UtilitiesPage_1.enableAuthorizations)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
            await (0, sleep_1.sleep)(20000);
        });
        await _8_9_1.test.step('Navigate to OC Identity and Assert Admin Has All Process Permission', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickAdmin(clusterName);
            await ocIdentityHomePage.clickAuthorizationsTab();
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await (0, sleep_1.sleep)(1000);
            await ocIdentityAuthorizationsPage.assertAuthorization('ROLEadmin*');
        });
        await _8_9_1.test.step('Navigate to Web Modeler', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickModeler();
            await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
                timeout: 60000,
            });
        });
        await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
            await modelerHomePage.clickCrossComponentProjectFolder();
        });
        await _8_9_1.test.step('Create Two BPMN Diagrams with User Task and Start Process Instance', async () => {
            await (0, UtilitiesPage_1.runMultipleProcesses)(clusterName, page, modelerHomePage, modelerCreatePage, {
                processName: processName,
                uploadFromFile: 'Camunda_Simple_User_Task_3',
            });
        });
        await _8_9_1.test.step('Navigate to Tasklist and Assert Both Processes Are Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickTasklist(clusterName);
            await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
                timeout: 30000,
            });
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.clickpopupContinueButton();
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process1);
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
        });
        await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.startProcess(process1);
            const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
            (0, test_1.expect)(firstProcessTaskCount).toBe(2);
        });
        await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.startProcess(process2);
            const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
            (0, test_1.expect)(secondProcessTaskCount).toBe(2);
        });
        await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickOperate(clusterName);
            await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
                timeout: 30000,
            });
            await operateHomePage.clickProcessesTab();
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1);
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
        });
    });
    (0, _8_9_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, }, testInfo) => {
        _8_9_1.test.slow();
        const clusterName = clusterNames[testInfo.title];
        const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
        const processName = 'RBA_SELECTED_PERM' + randomString;
        const role = `rbaSelectedProcessesPermission${randomString}`;
        const process1 = processName + '1';
        const process2 = processName + '2';
        const testUser = {
            username: process.env.C8_USERNAME_TEST_5,
            password: process.env.C8_PASSWORD_TEST_5,
        };
        await _8_9_1.test.step('Navigate to OC Identity and Assign User To A Role', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickAdmin(clusterName);
            await ocIdentityHomePage.clickRolesTab();
            await ocIdentityRolesPage.assignUserToRole(role, testUser.username);
        });
        await _8_9_1.test.step('Create Resource Authorization', async () => {
            await ocIdentityHomePage.clickAuthorizationsTab();
            await ocIdentityAuthorizationsPage.clickResourceTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.resourceCreateAuthorization)(role));
        });
        await _8_9_1.test.step('Create Component Authorization', async () => {
            await ocIdentityAuthorizationsPage.clickComponentTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.componentAccessAuthorization)(role));
        });
        await _8_9_1.test.step('Grant Process Definition Authorization for First Process', async () => {
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.processInstanceAllAuthorization)(role, process1));
        });
        await _8_9_1.test.step('Grant Process Definition Authorization for Second Process', async () => {
            await ocIdentityAuthorizationsPage.clickProcessDefinitionTab();
            await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.processInstanceAllAuthorization)(role, process2));
        });
        await _8_9_1.test.step('Navigate to Console and Enable RBA', async () => {
            await (0, UtilitiesPage_1.enableAuthorizations)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
            await (0, sleep_1.sleep)(20000);
        });
        await _8_9_1.test.step('Clear cookies and reset session', async () => {
            await page.context().clearCookies();
            await page.evaluate(() => {
                localStorage.clear();
                sessionStorage.clear();
            });
            await page.goto('/');
            await loginPage.loginWithTestUser(testUser);
        });
        await _8_9_1.test.step('Navigate to Web Modeler', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickModeler();
            await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
                timeout: 60000,
            });
        });
        await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
            await homePage.clickSkipCustomization();
            await modelerHomePage.createCrossComponentProjectFolder();
        });
        await _8_9_1.test.step('Create Two BPMN Diagrams with User Task and Start Process Instance', async () => {
            await (0, UtilitiesPage_1.runMultipleProcesses)(clusterName, page, modelerHomePage, modelerCreatePage, {
                processName: processName,
                uploadFromFile: 'Camunda_Simple_User_Task_4',
            });
        });
        await _8_9_1.test.step('Navigate to Tasklist and Assert Both Processes Are Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickTasklist(clusterName);
            await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
                timeout: 30000,
            });
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.clickpopupContinueButton();
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process1);
            await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
        });
        await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.startProcess(process1);
            const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
            (0, test_1.expect)(firstProcessTaskCount).toBe(2);
        });
        await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
            await taskPanelPage.clickProcessesTab();
            await taskProcessesPage.startProcess(process2);
            const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
            (0, test_1.expect)(secondProcessTaskCount).toBe(2);
        });
        await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
            await appsPage.clickCamundaApps();
            await appsPage.clickOperate(clusterName);
            await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
                timeout: 30000,
            });
            await operateHomePage.clickProcessesTab();
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1);
            await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
        });
    });
});
