"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const SM_8_6_1 = require("../../fixtures/SM-8.6");
const test_1 = require("@playwright/test");
const _setup_1 = require("../../test-setup.js");
if (process.env.IS_LICENSE_KEY === 'true') {
    SM_8_6_1.test.describe.configure({ mode: 'parallel' });
    SM_8_6_1.test.describe('License Key User Flows Test', () => {
        SM_8_6_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
            await navigationPage.goToIdentity((testInfo.workerIndex + 1) * 1000);
        });
        SM_8_6_1.test.afterEach(async ({ page }, testInfo) => {
            await (0, _setup_1.captureScreenshot)(page, testInfo);
            await (0, _setup_1.captureFailureVideo)(page, testInfo);
        });
        (0, SM_8_6_1.test)('License Invalid Commercial Expired User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-inv-com-expired') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Invalid Commercial Special Characters User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-inv-com-special-characters') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Invalid Commercial Wrong Signature User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-inv-com-wrong-signature') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Invalid Non-Commercial Expired User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-inv-ncom-expired') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagNonProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Commercial Changed Whitespaces User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-com-whitespace-changed') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Commercial Mixed Headers User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-com-mixed-headers') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Commercial No Headers User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-com-no-headers') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Commercial No New Lines User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-com-no-newlines') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Commercial Unlimited User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-com-unlimited') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Non-Commercial One Hundred Years User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-ncom-oneh-years') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
        (0, SM_8_6_1.test)('License Valid Non-Commercial Unlimited User Flow', async ({ navigationPage, identityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, consoleHomePage, }) => {
            if (process.env.LICENSE_KEY !== 'lic-val-ncom-unlimited') {
                SM_8_6_1.test.skip(true, 'Skipping test because test environment does not correct license key');
            }
            await SM_8_6_1.test.step('Assert Identity License Key Tag', async () => {
                await (0, test_1.expect)(identityPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Web Modeler License Key Tag', async () => {
                await navigationPage.goToModeler();
                await (0, test_1.expect)(modelerHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Tasklist License Key Tag', async () => {
                await navigationPage.goToTasklist();
                await (0, test_1.expect)(taskPanelPage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Operate License Key Tag', async () => {
                await navigationPage.goToOperate();
                await (0, test_1.expect)(operateHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Optimize License Key Tag', async () => {
                await navigationPage.goToOptimize();
                await (0, test_1.expect)(optimizeHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
            await SM_8_6_1.test.step('Assert Console License Key Tag', async () => {
                await navigationPage.goToConsole();
                await (0, test_1.expect)(consoleHomePage.licenseKeyTagProduction).toBeVisible({
                    timeout: 60000,
                });
            });
        });
    });
}
