package com.intland.codebeamer.functionaltest.test;

import com.codeborne.selenide.CollectionCondition;
import com.codeborne.selenide.Condition;
import com.intland.codebeamer.functionaltest.helper.Helper;
import com.intland.codebeamer.functionaltest.page.*;
import com.intland.codebeamer.functionaltest.page.admin.AddNewGroupDialog;
import com.intland.codebeamer.functionaltest.page.admin.AddNewMemberDialog;
import com.intland.codebeamer.functionaltest.page.admin.MembersPage;
import com.intland.codebeamer.functionaltest.page.baselines.NewBaselineDialog;
import com.intland.codebeamer.functionaltest.page.common.AccessDeniedPage;
import com.intland.codebeamer.functionaltest.page.common.MoreMenuHelper;
import com.intland.codebeamer.functionaltest.page.mystart.EditAccountPage;
import com.intland.codebeamer.functionaltest.page.mystart.MyStartPage;
import com.intland.codebeamer.functionaltest.page.projects.ProjectsPage;
import com.intland.codebeamer.functionaltest.page.systemadmin.DocumentsPage;
import com.intland.codebeamer.functionaltest.page.systemadmin.*;
import com.intland.codebeamer.functionaltest.page.trackers.*;
import com.intland.codebeamer.functionaltest.page.trackers.documentview.DocumentViewPage;
import com.intland.codebeamer.functionaltest.page.trackers.documentview.LeftPane;
import com.intland.codebeamer.functionaltest.page.wiki.NewChildWikiDialog;
import com.intland.codebeamer.functionaltest.page.wiki.ProjectWikiPage;
import com.intland.codebeamer.functionaltest.page.wiki.UpdateWikiPageDialog;
import org.apache.commons.lang3.RandomStringUtils;
import org.testng.annotations.*;

import java.text.SimpleDateFormat;
import java.util.*;

import static com.codeborne.selenide.CollectionCondition.empty;
import static com.codeborne.selenide.CollectionCondition.texts;
import static com.codeborne.selenide.Condition.*;
import static com.codeborne.selenide.Selenide.*;
import static org.testng.Assert.assertTrue;

/**
 * Copyright by Intland Software
 * <p>
 * All rights reserved.
 * <p>
 * This software is the confidential and proprietary information
 * of Intland Software. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the productLicense agreement
 * you entered into with Intland.
 */
public class LicenseTests extends BaseTest {

    private final String USERNAME = "licensetester";
    private final String LICENSE_GENERATOR_URL = "http://172.20.41.19:8700/cb/sysadmin/generateLicense.spr";
    private final String PROJECT_NAME = "test-project-GEN-0001000 selenide";
    private String productLicense = null;
    private MembersPage membersPage;
    private TrackersPage trackersPage;
    private SystemAdminPage systemAdminPage;
    private DocumentsPage documentsPage;
    private AddTagDialog addTagDialog;
    private ProjectWikiPage projectWikiPage;
    private ProjectAdminSettingsPage projectAdminSettingsPage;
    private TrackersCustomizationPage trackersCustomizationPage;
    private TrackerItemListPage trackerItemListPage;
    private TableViewPage tableViewPage;
    private DocumentViewPage documentViewPage;
    private TrackerItemDetailsPage trackerItemDetailsPage;
    private DashboardViewPage dashboardViewPage;
    private KanbanBoardPage kanbanBoardPage;
    private Map<String, String> trackerIds;
    private final String ISSUES = "Issues";
    private final String BUGS = "Bugs";
    private final String CHANGE_REQUESTS = "Change Requests";
    private final String REQUIREMENTS = "Requirements";
    private final String RISKS = "Risks";
    private final String TASKS = "Tasks";
    private final String TEST_RUNS = "Test Runs";
    private final String USER_STORIES = "User Stories";
    private final String CONFIGURATION_ITEMS = "Configuration Items";
    private final String TEST_CASES = "Test Cases";
    private final String RELEASES = "Releases";
    private final String COMPONENTS = "Components";
    private final String PLATFORMS = "Platforms";
    private final String CONTACTS = "Contacts";
    private final String TEST_SETS = "Test Sets";
    private final String TEST_CONFIGURATIONS = "Test Configurations";
    private final String TEAMS = "Teams";
    private final String TIMEKEEPING = "Timekeeping";

    private final String ISSUE = "Issue";
    private final String BUG = "Bug";
    private final String CHANGE_REQUEST = "Change Request";
    private final String REQUIREMENT = "Requirement";
    private final String RISK = "Risk";
    private final String TASK = "Task";
    private final String TEST_RUN = "Test Run";
    private final String USER_STORY = "User Story";
    private final String CONFIGURATION_ITEM = "Configuration Item";
    private final String TEST_CASE = "Test Case";
    private final String RELEASE = "Release";
    private final String COMPONENT = "Component";
    private final String PLATFORM = "Platform";
    private final String CONTACT = "Contact";
    private final String TEST_SET = "Test Set";
    private final String TEST_CONFIGURATION = "Test Configuration";
    private final String TEAM = "Team";
    private final String TIME_RECORDING = "Time Recording";


    private void generateTestDataForTestRunsTracker() {
        int startCt = trackersPage.getOpenItemsCountOf(TEST_RUNS);
        TrackerItemListPage trackerItemListPage = trackersPage.openTrackerFromLeftTree(TEST_CASES);
        DocumentViewPage documentViewPage = (DocumentViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DOCUMENT_VIEW);
        TrackerItemDetailsPage trackerItemDetailsPage = (TrackerItemDetailsPage) documentViewPage.leftPane.clickOnLeftTreeContextMenuItem("Charger Test", 1, LeftPane.LeftTreeContextMenuItem.OPEN);
        switchTo().window(1);
        SubmitWorkItemPage submitWorkItemPage = trackerItemDetailsPage.clickOnNewTestRun();
        submitWorkItemPage.tickTestConfigurations(true, "Sony tablet");
        submitWorkItemPage.clickOnSave();
        submitWorkItemPage.clickOnTrackers();
        assertTrue(startCt < trackersPage.getOpenItemsCountOf(TEST_RUNS), "Cannot create new Test Run");
    }

    public void commonBeforeClass(List<LicenseGeneratorPage.License> licenses) {
        //generate a license and store it
        LicenseGeneratorPage licenseGeneratorPage = open(LICENSE_GENERATOR_URL, LicenseGeneratorPage.class);
        productLicense = licenseGeneratorPage.generateLicense("LIN-00:0C:29:AC:79:26", licenses);
        //apply the firstSixProductLicenses
        MyStartPage myStartPage = Helper.loginWithSystemAdmin();
        SystemAdminPage systemAdminPage = myStartPage.clickOnSystemAdmin();
        LicensePage licensePage = systemAdminPage.clickOnLicense();
        EditLicensePage editLicensePage = licensePage.clickOnEditLicense();
        editLicensePage.fillLicense(productLicense);
        VerifyNewLicensePage verifyNewLicensePage = editLicensePage.clickOnNext();
        licensePage = verifyNewLicensePage.clickOnSaveLicense();
        systemAdminPage = licensePage.clickOnSystemAdmin();
        //check if test user exists and create one if not
        UsersPage usersPage = systemAdminPage.clickOnUserAccounts();
        if (!usersPage.doesUserExist(USERNAME)) {
            usersPage.createUser(USERNAME, USERNAME, USERNAME + "@mail.ru", CreateUserPage.Group.SYSTEM_ADMIN);
        }
        //add new user to the project
        //myStartPage = Helper.loginWithSystemAdmin();
        ProjectsPage projectsPage = myStartPage.clickOnProjects();
        projectsPage.clickOnCompactList();
        ProjectWikiPage projectWikiPage = projectsPage.clickOnProject(PROJECT_NAME);
        membersPage = projectWikiPage.clickOnAdminMembers();
        if (!membersPage.isUserAlreadyMember(USERNAME)) {
            AddNewMemberDialog addNewMemberDialog = membersPage.clickOnAddNewMember();
            switchTo().frame("inlinedPopupIframe");
            addNewMemberDialog.clickOnAddNewMemberFromCodebeamerTab();
            addNewMemberDialog.fillUser(USERNAME);
            addNewMemberDialog.tickRoles(Arrays.asList(AddNewMemberDialog.Role.PROJECT_ADMIN), true);
            addNewMemberDialog.clickOnAdd();
        }
        //collect tracker ids
        trackersPage = membersPage.clickOnTrackers();
        trackerIds = trackersPage.getAllTrackerIds();
        //if there is no test runs generate some
        if (trackersPage.getOpenItemsCountOf(TEST_RUNS) == 0) {
            generateTestDataForTestRunsTracker();
        }
        //close();
    }

    @BeforeClass(groups = {"collab", "alm", "dm", "qa", "dr", "ag"}, timeOut = 300000)
    public void beforeClass() {
        commonBeforeClass(Arrays.asList(
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.APPLICATION_LIFECYLE_MANAGEMENT,
                        Arrays.asList(LicenseGeneratorPage.AdditionalOption.SERVICE_DESK,
                                LicenseGeneratorPage.AdditionalOption.ESCALATION,
                                LicenseGeneratorPage.AdditionalOption.DOCUMENT_APPROVAL,
                                LicenseGeneratorPage.AdditionalOption.DOCUMENT_REVIEW,
                                LicenseGeneratorPage.AdditionalOption.TEST_SERVER),
                        20, 20),
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.AGILE,
                        Collections.emptyList(),
                        20, 20),
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.DEVELOPMENT_MANAGEMENT,
                        Collections.emptyList(),
                        20, 20),
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.COLLABORATION_PLATFORM,
                        Collections.emptyList(),
                        20, 20),
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.QA_TEST_MANAGEMENT,
                        Collections.emptyList(),
                        20, 20)
        ));
        close();
    }

    @BeforeClass(groups = {"rm", "sd"}, timeOut = 300000)
    public void beforeClassOther() {
        commonBeforeClass(Arrays.asList(new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.APPLICATION_LIFECYLE_MANAGEMENT,
                        Arrays.asList(LicenseGeneratorPage.AdditionalOption.SERVICE_DESK,
                                LicenseGeneratorPage.AdditionalOption.ESCALATION,
                                LicenseGeneratorPage.AdditionalOption.DOCUMENT_APPROVAL,
                                LicenseGeneratorPage.AdditionalOption.DOCUMENT_REVIEW),
                        20, 20),
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.REQUIREMENTS_MANAGEMENT,
                        Collections.emptyList(),
                        20, 20),
                new LicenseGeneratorPage.License(LicenseGeneratorPage.Product.SERVICE_DESK,
                        Collections.emptyList(),
                        20, 20)
        ));
        close();
    }

    public void commonBeforeGroups(CreateUserPage.LicenseType licenseType) {
        //set user's license
        MyStartPage myStartPage = Helper.loginWithSystemAdmin();
        SystemAdminPage systemAdminPage = myStartPage.clickOnSystemAdmin();
        UsersPage usersPage = systemAdminPage.clickOnUserAccounts();
        usersPage.filter(USERNAME);
        EditAccountPage editAccountPage = usersPage.clickOnEditInContextMenu(USERNAME);
        editAccountPage.setLicenseTypes(Arrays.asList(
                licenseType
        ), true);
        editAccountPage.clickOnSave();
        close();
    }

    @BeforeMethod(groups = {"collab", "alm", "dm", "qa", "dr", "rm", "sd", "ag"})
    public void beforeMethod() {
        Helper.loginWithUser(USERNAME, USERNAME);
        //select the project
        trackersPage = open(HOST_URL + "/project/GEN-00010001/tracker", TrackersPage.class);
    }

    @AfterMethod(alwaysRun = true)
    public void afterMethod(){
        close();
    }

    @BeforeGroups(groups = {"collab"})
    public void beforeGroupsCollab() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.COLLAB, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"alm"})
    public void beforeGroupsALM() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.ALM, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"dm"})
    public void beforeGroupsDM() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.CM, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"rm"})
    public void beforeGroupsRM() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.RM, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"qa"})
    public void beforeGroupsQA() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.QA_TEST, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"dr"})
    public void beforeGroupsDR() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.DR, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"sd"})
    public void beforeGroupsSD() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.SD, CreateUserPage.LicenseType.License.FLOATING));
    }

    @BeforeGroups(groups = {"ag"})
    public void beforeGroupsAG() {
        commonBeforeGroups(new CreateUserPage.LicenseType(CreateUserPage.LicenseType.Product.AG, CreateUserPage.LicenseType.License.FLOATING));
    }

    //<editor-fold desc="utilities">
    private void checkIfYouCanCreateANewItemToTracker(String trackerName) {
        TrackerItemListPage trackerItemListPage = trackersPage.openTrackerFromLeftTree(trackerName);
        TableViewPage tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        CreateEditTrackerItemPage createEditTrackerItemPage = tableViewPage.clickOnNewItem();
        createEditTrackerItemPage.checkIfSave(visible.because("Cannot create a new item to the " + trackerName + " tracker"));
        createEditTrackerItemPage.clickOnCancel();
        trackersPage.clickOnTrackers();
    }

    public void checkIfYouCanCreateANewItemToTrackerReleases() {
        TrackerItemListPage trackerItemListPage = trackersPage.openTrackerFromLeftTree(RELEASES);
        DashboardViewPage dashboardViewPage = (DashboardViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DASHBOARD);
        NewReleasePage newReleasePage = dashboardViewPage.clickOnNewRelease();
        newReleasePage.checkIfSave(visible.because("Cannot create a new item to the " + RELEASES + " tracker"));
        newReleasePage.clickOnCancel();
        trackersPage.clickOnTrackers();
    }

    private void checkIfYouCannotCreateANewItemToTracker(String trackerName) {
        TrackerItemListPage trackerItemListPage = trackersPage.openTrackerFromLeftTree(trackerName);
        TableViewPage tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        tableViewPage.checkIfNewItem(hidden);
    }

    private void checkIfYouCanCreateANewItemToTrackerTestRuns() {
        int startCt = trackersPage.getOpenItemsCountOf(TEST_RUNS);
        TrackerItemListPage trackerItemListPage = trackersPage.openTrackerFromLeftTree(TEST_CASES);
        DocumentViewPage documentViewPage = (DocumentViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DOCUMENT_VIEW);
        TrackerItemDetailsPage trackerItemDetailsPage = (TrackerItemDetailsPage) documentViewPage.leftPane.clickOnLeftTreeContextMenuItem("Charger Test", 1, LeftPane.LeftTreeContextMenuItem.OPEN);
        Helper.switchToWindowByRegex("Charger Test.*");
        SubmitWorkItemPage submitWorkItemPage = trackerItemDetailsPage.clickOnNewTestRun();
        submitWorkItemPage.tickTestConfigurations(true, "Sony tablet");
        submitWorkItemPage.clickOnSave();
        submitWorkItemPage.clickOnTrackers();
        assertTrue(startCt < trackersPage.getOpenItemsCountOf(TEST_RUNS), "Cannot create new Test Run");
    }

    private void checkIfYouCanCreateANewThisKindOfTracker(String trackerType) {
        trackersPage = page(CreateEditTrackerItemPage.class).clickOnTrackers();
        NewTrackerPage newTrackerPage = trackersPage.clickOnNewTracker();
        newTrackerPage.getAllAvailableTypes().shouldHave(Helper.containsText(trackerType));
        //newTrackerPage.checkIfSave(visible.because("Cannot create "+trackerType+" type of tracker"));
        trackersPage = newTrackerPage.clickOnCancel();
    }

    private void checkIfYouCannotCreateANewThisKindOfTracker(String trackerType) {
        trackersPage = page(CreateEditTrackerItemPage.class).clickOnTrackers();
        if (trackersPage.isNewTrackerHidden()) return;
        NewTrackerPage newTrackerPage = trackersPage.clickOnNewTracker();
        newTrackerPage.getAllAvailableTypes().filter(matchText(trackerType)).shouldHave(empty);
        //newTrackerPage.checkIfSave(visible.because("Cannot create "+trackerType+" type of tracker"));
        trackersPage = newTrackerPage.clickOnCancel();
    }

    private void checkIfYouCanAccessConfigurationPageOfTracker(String trackerName) {
        trackersPage.openTrackerFromLeftTree(trackerName);
        TrackersCustomizationPage trackersCustomizationPage = (TrackersCustomizationPage) page(TrackerItemListPage.class).clickOnMoreMenuItem(MoreMenuHelper.MoreMenuItem.CUSTOMIZE);
        assertTrue(trackersCustomizationPage.isPageLoaded(), "Cannot access tracker " + trackerName + " configuration page");
        trackersPage.clickOnTrackers();
    }

    private void checkIfYouCanAccessTrackerAndSeeItems(String trackerName) {
        TrackerItemListPage trackerItemListPage = trackersPage.openTrackerFromLeftTree(trackerName);
        TableViewPage tableView = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        tableView.getAllRows().shouldHave(CollectionCondition.sizeGreaterThan(0));
        trackersPage.clickOnTrackers();
    }

    private void checkIfYouCannotAccessTrackerWithDirectUrl(String trackerName) {
        open(HOST_URL + "/tracker/" + trackerIds.get(trackerName), TrackerItemListPage.class).checkIfAccessDenied(visible);
        back();
    }

    private void checkIfYouCannotAccessConfigurationPageWithDirectUrl(String trackerName) {
        open(HOST_URL + "/proj/tracker/configuration.spr?tracker_id=" + trackerIds.get(trackerName), TrackersCustomizationPage.class).checkIfAccessDenied(visible);
        back();
    }
    //</editor-fold>

    //<editor-fold desc="collab">
    @Test(groups = {"collab"})
    public void testIssuesWithCollabLicense() {
        trackersPage.checkIfTracker("Issues", visible);
        checkIfYouCanCreateANewItemToTracker("Issues");
        checkIfYouCanCreateANewThisKindOfTracker("Issue");
    }

    @Test(groups = {"collab"})
    public void testBugsWithCollabLicense() {
        trackersPage.checkIfTracker("Bugs", visible);
        checkIfYouCanCreateANewItemToTracker("Bugs");
        checkIfYouCanAccessConfigurationPageOfTracker("Bugs");
        trackersPage.clickOnTrackers();
    }

    @Test(groups = {"collab"})
    public void testChangeRequestsWithCollabLicense() {
        trackersPage.checkIfTracker("Change Requests", visible);
        checkIfYouCanCreateANewItemToTracker("Change Requests");
        checkIfYouCanCreateANewThisKindOfTracker("Change Request");
    }

    @Test(groups = {"collab"})
    public void testRequirementsWithCollabLicense() {
        trackersPage.checkIfTracker("Requirements", visible);
        checkIfYouCanAccessTrackerAndSeeItems("Requirements");
        checkIfYouCanAccessConfigurationPageOfTracker("Requirements");
    }

    @Test(groups = {"collab"})
    public void testRisksWithCollabLicense() {
        trackersPage.checkIfTracker("Risks", hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl("Risks");
        checkIfYouCannotAccessConfigurationPageWithDirectUrl("Risks");
    }

    @Test(groups = {"collab"})
    public void testTasksWithCollabLicense() {
        trackersPage.checkIfTracker("Tasks", visible);
        checkIfYouCanCreateANewItemToTracker("Tasks");
        checkIfYouCanCreateANewThisKindOfTracker("Task");
    }

    @Test(groups = {"collab"})
    public void testTestRunsWithCollabLicense() {
        trackersPage.checkIfTracker("Test Runs", hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl("Test Runs");
        checkIfYouCannotCreateANewThisKindOfTracker("Test Run");
    }

    @Test(groups = {"collab"})
    public void testUserStoriesWithCollabLicense() {
        trackersPage.checkIfTracker("User Stories", visible);
        checkIfYouCanAccessTrackerAndSeeItems("User Stories");
        checkIfYouCannotCreateANewThisKindOfTracker("User Story");
    }

    @Test(groups = {"collab"})
    public void testConfigurationItemsWithCollabLicense() {
        trackersPage.checkIfTracker("Configuration Items", visible);
        checkIfYouCanAccessTrackerAndSeeItems("Configuration Items");
        checkIfYouCannotCreateANewItemToTracker("Configuration Items");
    }

    @Test(groups = {"collab"})
    public void testTestCasesWithCollabLicense() {
        trackersPage.checkIfTracker("Test Cases", hidden);
        checkIfYouCannotCreateANewThisKindOfTracker("Test Case");
        checkIfYouCannotAccessConfigurationPageWithDirectUrl("Test Cases");
    }

    @Test(groups = {"collab"})
    public void testReleasesWithCollabLicense() {
        trackersPage.checkIfTracker("Releases", hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl("Releases");
        checkIfYouCannotCreateANewThisKindOfTracker("Release");
    }

    @Test(groups = {"collab"})
    public void testComponentsWithCollabLicense() {
        trackersPage.checkIfTracker("Components", visible);
        checkIfYouCanAccessTrackerAndSeeItems("Components");
        checkIfYouCannotCreateANewThisKindOfTracker("Component");
    }

    @Test(groups = {"collab"})
    public void testPlatformsWithCollabLicense() {
        trackersPage.checkIfTracker("Platforms", visible);
        checkIfYouCanAccessTrackerAndSeeItems("Platforms");
        checkIfYouCannotCreateANewItemToTracker("Platforms");
    }

    @Test(groups = {"collab"})
    public void testContactsWithCollabLicense() {
        trackersPage.checkIfTracker("Contacts", visible);
        checkIfYouCanAccessTrackerAndSeeItems("Contacts");
        checkIfYouCanAccessConfigurationPageOfTracker("Contacts");
    }

    @Test(groups = {"collab"})
    public void testTestSetsWithCollabLicense() {
        trackersPage.checkIfTracker("Test Sets", hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl("Test Sets");
        checkIfYouCannotAccessConfigurationPageWithDirectUrl("Test Sets");
    }

    @Test(groups = {"collab"})
    public void testTestConfigurationsWithCollabLicense() {
        trackersPage.checkIfTracker("Test Configurations", hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl("Test Configurations");
        checkIfYouCannotCreateANewThisKindOfTracker("Test Configuration");
    }

    @Test(groups = {"collab"})
    public void testTeamsWithCollabLicense() {
        trackersPage.checkIfTracker("Teams", hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl("Teams");
        checkIfYouCannotAccessConfigurationPageWithDirectUrl("Teams");
    }

    @Test(groups = {"collab"})
    public void testTimekeepingCollabLicense() {
        trackersPage.checkIfTracker("Timekeeping", visible);
        checkIfYouCanCreateANewItemToTracker("Timekeeping");
        checkIfYouCanAccessConfigurationPageOfTracker("Timekeeping");
    }
    //</editor-fold>

    //<editor-fold desc="alm">
    @Test(groups = {"alm"})
    public void testIssuesWithALMLicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanCreateANewItemToTracker(ISSUES);
        checkIfYouCanCreateANewThisKindOfTracker("Issue");
    }

    @Test(groups = {"alm"})
    public void testBugsWithALMLicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanCreateANewItemToTracker(BUGS);
        checkIfYouCanCreateANewThisKindOfTracker("Bug");
    }

    @Test(groups = {"alm"})
    public void testChangeRequestsWithALMLicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanCreateANewItemToTracker(CHANGE_REQUESTS);
        checkIfYouCanCreateANewThisKindOfTracker(CHANGE_REQUEST);
    }

    @Test(groups = {"alm"})
    public void testRequirementsWithALMLicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanCreateANewItemToTracker(REQUIREMENTS);
        checkIfYouCanAccessConfigurationPageOfTracker(REQUIREMENTS);
    }

    @Test(groups = {"alm"})
    public void testRisksWithALMLicense() {
        trackersPage.checkIfTracker(RISKS, visible);
        checkIfYouCanCreateANewItemToTracker(RISKS);
        checkIfYouCanCreateANewThisKindOfTracker(RISK);
    }

    @Test(groups = {"alm"})
    public void testTasksWithALMLicense() {
        trackersPage.checkIfTracker(TASKS, visible);
        checkIfYouCanCreateANewItemToTracker(TASKS);
        checkIfYouCanAccessConfigurationPageOfTracker(TASKS);
    }

    @Test(groups = {"alm"})
    public void testTestRunsWithALMLicense() {
        trackersPage.checkIfTracker(TEST_RUNS, visible);
        checkIfYouCanCreateANewItemToTrackerTestRuns();
        checkIfYouCanCreateANewThisKindOfTracker(TEST_RUN);
    }

    @Test(groups = {"alm"})
    public void testUserStoriesWithALMLicense() {
        trackersPage.checkIfTracker(USER_STORIES, visible);
        checkIfYouCanCreateANewItemToTracker(USER_STORIES);
        checkIfYouCanAccessConfigurationPageOfTracker(USER_STORIES);
    }

    @Test(groups = {"alm"})
    public void testConfigurationItemsWithALMLicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, visible);
        checkIfYouCanCreateANewItemToTracker(CONFIGURATION_ITEMS);
        checkIfYouCanCreateANewThisKindOfTracker(CONFIGURATION_ITEM);
    }

    @Test(groups = {"alm"})
    public void testTestCasesWithALMLicense() {
        trackersPage.checkIfTracker(TEST_CASES, visible);
        checkIfYouCanCreateANewItemToTracker(TEST_CASES);
        checkIfYouCanAccessConfigurationPageOfTracker(TEST_CASES);
    }

    @Test(groups = {"alm"})
    public void testReleasesWithALMLicense() {
        trackersPage.checkIfTracker(RELEASES, visible);
        checkIfYouCanCreateANewItemToTrackerReleases();
        checkIfYouCanCreateANewThisKindOfTracker(RELEASE);
    }

    @Test(groups = {"alm"})
    public void testComponentsWithALMLicense() {
        trackersPage.checkIfTracker(COMPONENTS, visible);
        checkIfYouCanCreateANewItemToTracker(COMPONENTS);
        checkIfYouCanAccessConfigurationPageOfTracker(COMPONENTS);
    }

    @Test(groups = {"alm"})
    public void testPlatformsWithALMLicense() {
        trackersPage.checkIfTracker(PLATFORMS, visible);
        checkIfYouCanCreateANewItemToTracker(PLATFORMS);
        checkIfYouCanCreateANewThisKindOfTracker(PLATFORM);
    }

    @Test(groups = {"alm"})
    public void testContactsWithALMLicense() {
        trackersPage.checkIfTracker(CONTACTS, visible);
        checkIfYouCanCreateANewItemToTracker(CONTACTS);
        checkIfYouCanAccessConfigurationPageOfTracker(CONTACTS);
    }

    @Test(groups = {"alm"})
    public void testTestSetsWithALMLicense() {
        trackersPage.checkIfTracker(TEST_SETS, visible);
        checkIfYouCanCreateANewItemToTracker(TEST_SETS);
        checkIfYouCanCreateANewThisKindOfTracker(TEST_SET);
    }

    @Test(groups = {"alm"})
    public void testTestConfigurationsWithALMLicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, visible);
        checkIfYouCanCreateANewItemToTracker(TEST_CONFIGURATIONS);
        checkIfYouCanAccessConfigurationPageOfTracker(TEST_CONFIGURATIONS);
    }

    @Test(groups = {"alm"})
    public void testTeamsWithALMLicense() {
        trackersPage.checkIfTracker(TEAMS, visible);
        checkIfYouCanCreateANewItemToTracker(TEAMS);
        checkIfYouCanCreateANewThisKindOfTracker(TEAM);
    }

    @Test(groups = {"alm"})
    public void testTimeRecordsWithALMLicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCanAccessConfigurationPageOfTracker(TIMEKEEPING);
    }
    //</editor-fold>

    //<editor-fold desc="dm https://codebeamer.com/cb/issue/920628">
    @Test(groups = {"dm"})
    public void testIssuesWithDMLicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanCreateANewItemToTracker(ISSUES);
        checkIfYouCanCreateANewThisKindOfTracker(ISSUE);
    }

    @Test(groups = {"dm"})
    public void testBugsWithDMLicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanCreateANewItemToTracker(BUGS);
        checkIfYouCanAccessConfigurationPageOfTracker(BUGS);
    }

    @Test(groups = {"dm"})
    public void testChangeRequestsWithDMLicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanCreateANewItemToTracker(CHANGE_REQUESTS);
        checkIfYouCanCreateANewThisKindOfTracker(CHANGE_REQUEST);
    }

    @Test(groups = {"dm"})
    public void testRequirementsWithDMLicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(REQUIREMENTS);
        checkIfYouCannotCreateANewThisKindOfTracker(REQUIREMENT);
    }

    @Test(groups = {"dm"})
    public void testRisksWithDMLicense() {
        trackersPage.checkIfTracker(RISKS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(RISKS);
        checkIfYouCannotCreateANewItemToTracker(RISKS);
    }

    @Test(groups = {"dm"})
    public void testTasksWithDMLicense() {
        trackersPage.checkIfTracker(TASKS, visible);
        checkIfYouCanCreateANewItemToTracker(TASKS);
        checkIfYouCanCreateANewThisKindOfTracker(TASK);
    }

    @Test(groups = {"dm"})
    public void testTestRunsWithDMLicense() {
        trackersPage.checkIfTracker(TEST_RUNS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_RUNS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_RUN);
    }

    @Test(groups = {"dm"})
    public void testUserStoriesWithDMLicense() {
        trackersPage.checkIfTracker(USER_STORIES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(USER_STORIES);
        checkIfYouCannotCreateANewItemToTracker(USER_STORIES);
    }

    @Test(groups = {"dm"})
    public void testConfigurationItemsWithDMLicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, visible);
        checkIfYouCanCreateANewItemToTracker(CONFIGURATION_ITEMS);
        checkIfYouCanAccessConfigurationPageOfTracker(CONFIGURATION_ITEMS);
    }

    @Test(groups = {"dm"})
    public void testTestCasesWithDMLicense() {
        trackersPage.checkIfTracker(TEST_CASES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_CASES);
        checkIfYouCannotCreateANewItemToTracker(TEST_CASES);
    }

    @Test(groups = {"dm"})
    public void testReleasesWithDMLicense() {
        trackersPage.checkIfTracker(RELEASES, visible);
        checkIfYouCanCreateANewItemToTrackerReleases();
        checkIfYouCanCreateANewThisKindOfTracker(RELEASE);
    }

    @Test(groups = {"dm"})
    public void testComponentsWithDMLicense() {
        trackersPage.checkIfTracker(COMPONENTS, visible);
        checkIfYouCanCreateANewItemToTracker(COMPONENTS);
        checkIfYouCanAccessConfigurationPageOfTracker(COMPONENTS);
    }

    @Test(groups = {"dm"})
    public void testPlatformsWithDMLicense() {
        trackersPage.checkIfTracker(PLATFORMS, visible);
        checkIfYouCanCreateANewItemToTracker(PLATFORMS);
        checkIfYouCanCreateANewThisKindOfTracker(PLATFORM);
    }

    @Test(groups = {"dm"})
    public void testContactsWithDMLicense() {
        trackersPage.checkIfTracker(CONTACTS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(CONTACTS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(CONTACTS);
    }

    @Test(groups = {"dm"})
    public void testTestSetsWithDMLicense() {
        trackersPage.checkIfTracker(TEST_SETS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_SETS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_SET);
    }

    @Test(groups = {"dm"})
    public void testTestConfigurationsWithDMLicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_CONFIGURATIONS);
        checkIfYouCannotCreateANewItemToTracker(TEST_CONFIGURATIONS);
    }

    @Test(groups = {"dm"})
    public void testTeamsWithDMLicense() {
        trackersPage.checkIfTracker(TEAMS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEAMS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEAM);
    }

    @Test(groups = {"dm"})
    public void testTimeRecordsWithDMLicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCanAccessConfigurationPageOfTracker(TIMEKEEPING);
    }
    //</editor-fold>

    //<editor-fold desc="rm">
    @Test(groups = {"rm"})
    public void testIssuesWithRMLicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(ISSUES);
        checkIfYouCannotCreateANewThisKindOfTracker(ISSUE);
    }

    @Test(groups = {"rm"})
    public void testBugsWithRMLicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(BUGS);
        checkIfYouCannotCreateANewItemToTracker(BUGS);
    }

    @Test(groups = {"rm"})
    public void testChangeRequestsWithRMLicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanCreateANewItemToTracker(CHANGE_REQUESTS);
        checkIfYouCanCreateANewThisKindOfTracker(CHANGE_REQUEST);
    }

    @Test(groups = {"rm"})
    public void testRequirementsWithRMLicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanCreateANewItemToTracker(REQUIREMENTS);
        checkIfYouCanAccessConfigurationPageOfTracker(REQUIREMENTS);
    }

    @Test(groups = {"rm"})
    public void testRisksWithRMLicense() {
        trackersPage.checkIfTracker(RISKS, visible);
        checkIfYouCanCreateANewItemToTracker(RISKS);
        checkIfYouCanCreateANewThisKindOfTracker(RISK);
    }

    @Test(groups = {"rm"})
    public void testTasksWithRMLicense() {
        trackersPage.checkIfTracker(TASKS, visible);
        checkIfYouCanCreateANewItemToTracker(TASKS);
        checkIfYouCanAccessConfigurationPageOfTracker(TASKS);
    }

    @Test(groups = {"rm"})
    public void testTestRunsWithRMLicense() {
        trackersPage.checkIfTracker(TEST_RUNS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_RUNS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_RUN);
    }

    @Test(groups = {"rm"})
    public void testUserStoriesWithRMLicense() {
        trackersPage.checkIfTracker(USER_STORIES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(USER_STORIES);
        checkIfYouCannotCreateANewItemToTracker(USER_STORIES);
    }

    @Test(groups = {"rm"})
    public void testConfigurationItemsWithRMLicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, visible);
        checkIfYouCanCreateANewItemToTracker(CONFIGURATION_ITEMS);
        checkIfYouCanCreateANewThisKindOfTracker(CONFIGURATION_ITEM);
    }

    @Test(groups = {"rm"})
    public void testTestCasesWithRMLicense() {
        trackersPage.checkIfTracker(TEST_CASES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_CASES);
        checkIfYouCannotCreateANewItemToTracker(TEST_CASES);
    }

    @Test(groups = {"rm"})
    public void testReleasesWithRMLicense() {
        trackersPage.checkIfTracker(RELEASES, visible);
        checkIfYouCanCreateANewItemToTrackerReleases();
        checkIfYouCanAccessConfigurationPageOfTracker(RELEASES);
    }

    @Test(groups = {"rm"})
    public void testComponentsWithRMLicense() {
        trackersPage.checkIfTracker(COMPONENTS, visible);
        checkIfYouCanCreateANewItemToTracker(COMPONENTS);
        checkIfYouCanCreateANewThisKindOfTracker(COMPONENT);
    }

    @Test(groups = {"rm"})
    public void testPlatformsWithRMLicense() {
        trackersPage.checkIfTracker(PLATFORMS, visible);
        checkIfYouCanCreateANewItemToTracker(PLATFORMS);
        checkIfYouCanAccessConfigurationPageOfTracker(PLATFORMS);
    }

    @Test(groups = {"rm"})
    public void testContactsWithRMLicense() {
        trackersPage.checkIfTracker(CONTACTS, visible);
        checkIfYouCanCreateANewItemToTracker(CONTACTS);
        checkIfYouCanCreateANewThisKindOfTracker(CONTACT);
    }

    @Test(groups = {"rm"})
    public void testTestSetsWithRMLicense() {
        trackersPage.checkIfTracker(TEST_SETS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_SETS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_SET);
    }

    @Test(groups = {"rm"})
    public void testTestConfigurationsWithRMLicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_CONFIGURATIONS);
        checkIfYouCannotCreateANewItemToTracker(TEST_CONFIGURATIONS);
    }

    @Test(groups = {"rm"})
    public void testTeamsWithRMLicense() {
        trackersPage.checkIfTracker(TEAMS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEAMS);
        checkIfYouCannotCreateANewItemToTracker(TEAMS);
    }

    @Test(groups = {"rm"})
    public void testTimeRecordsWithRMLicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCanAccessConfigurationPageOfTracker(TIMEKEEPING);
    }
    //</editor-fold>

    //<editor-fold desc="qa">
    @Test(groups = {"qa"})
    public void testIssuesWithQALicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanCreateANewItemToTracker(ISSUES);
        checkIfYouCanCreateANewThisKindOfTracker(ISSUE);
    }

    @Test(groups = {"qa"})
    public void testBugsWithQALicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanCreateANewItemToTracker(BUGS);
        checkIfYouCanAccessConfigurationPageOfTracker(BUGS);
    }

    @Test(groups = {"qa"})
    public void testChangeRequestsWithQALicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanCreateANewItemToTracker(CHANGE_REQUESTS);
        checkIfYouCanCreateANewThisKindOfTracker(CHANGE_REQUEST);
    }

    @Test(groups = {"qa"})
    public void testRequirementsWithQALicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(REQUIREMENTS);
        checkIfYouCannotCreateANewThisKindOfTracker(REQUIREMENT);
    }

    @Test(groups = {"qa"})
    public void testRisksWithQALicense() {
        trackersPage.checkIfTracker(RISKS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(RISKS);
        checkIfYouCannotCreateANewItemToTracker(RISKS);
    }

    @Test(groups = {"qa"})
    public void testTasksWithQALicense() {
        trackersPage.checkIfTracker(TASKS, visible);
        checkIfYouCanCreateANewItemToTracker(TASKS);
        checkIfYouCanAccessConfigurationPageOfTracker(TASKS);
    }

    @Test(groups = {"qa"})
    public void testTestRunsWithQALicense() {
        trackersPage.checkIfTracker(TEST_RUNS, visible);
        checkIfYouCanCreateANewItemToTrackerTestRuns();
        checkIfYouCanCreateANewThisKindOfTracker(TEST_RUN);
    }

    @Test(groups = {"qa"})
    public void testUserStoriesWithQALicense() {
        trackersPage.checkIfTracker(USER_STORIES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(USER_STORIES);
        checkIfYouCannotCreateANewThisKindOfTracker(USER_STORY);
    }

    @Test(groups = {"qa"})
    public void testConfigurationItemsWithQALicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, visible);
        checkIfYouCanCreateANewItemToTracker(CONFIGURATION_ITEMS);
        checkIfYouCanAccessConfigurationPageOfTracker(CONFIGURATION_ITEMS);
    }

    @Test(groups = {"qa"})
    public void testTestCasesWithQALicense() {
        trackersPage.checkIfTracker(TEST_CASES, visible);
        checkIfYouCanCreateANewItemToTracker(TEST_CASES);
        checkIfYouCanCreateANewThisKindOfTracker(TEST_CASE);
    }

    @Test(groups = {"qa"})
    public void testReleasesWithQALicense() {
        trackersPage.checkIfTracker(RELEASES, visible);
        checkIfYouCanCreateANewItemToTrackerReleases();
        checkIfYouCanAccessConfigurationPageOfTracker(RELEASES);
    }

    @Test(groups = {"qa"})
    public void testComponentsWithQALicense() {
        trackersPage.checkIfTracker(COMPONENTS, visible);
        checkIfYouCanCreateANewItemToTracker(COMPONENTS);
        checkIfYouCanCreateANewThisKindOfTracker(COMPONENT);
    }

    @Test(groups = {"qa"})
    public void testPlatformsWithQALicense() {
        trackersPage.checkIfTracker(PLATFORMS, visible);
        checkIfYouCanCreateANewItemToTracker(PLATFORMS);
        checkIfYouCanAccessConfigurationPageOfTracker(PLATFORMS);
    }

    @Test(groups = {"qa"})
    public void testContactsWithQALicense() {
        trackersPage.checkIfTracker(CONTACTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(CONTACTS);
        checkIfYouCannotCreateANewItemToTracker(CONTACTS);
    }

    @Test(groups = {"qa"})
    public void testTestSetsWithQALicense() {
        trackersPage.checkIfTracker(TEST_SETS, visible);
        checkIfYouCanCreateANewItemToTracker(TEST_SETS);
        checkIfYouCanCreateANewThisKindOfTracker(TEST_SET);
    }

    @Test(groups = {"qa"})
    public void testTestConfigurationsWithQALicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, visible);
        checkIfYouCanCreateANewItemToTracker(TEST_CONFIGURATIONS);
        checkIfYouCanAccessConfigurationPageOfTracker(TEST_CONFIGURATIONS);
    }

    @Test(groups = {"qa"})
    public void testTeamsWithQALicense() {
        trackersPage.checkIfTracker(TEAMS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEAMS);
        checkIfYouCannotCreateANewItemToTracker(TEAMS);
    }

    @Test(groups = {"qa"})
    public void testTimeRecordsWithQALicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCanCreateANewThisKindOfTracker(TIME_RECORDING);
    }
    //</editor-fold>

    //<editor-fold desc="dr">
    @Test(groups = {"dr"})
    public void testIssuesWithDRLicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(ISSUES);
        checkIfYouCannotCreateANewThisKindOfTracker(ISSUE);
    }

    @Test(groups = {"dr"})
    public void testBugsWithDRLicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(BUGS);
        checkIfYouCannotCreateANewItemToTracker(BUGS);
    }

    @Test(groups = {"dr"})
    public void testChangeRequestsWithDRLicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(CHANGE_REQUESTS);
        checkIfYouCannotCreateANewThisKindOfTracker(CHANGE_REQUEST);
    }

    @Test(groups = {"dr"})
    public void testRequirementsWithDRLicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(REQUIREMENTS);
        checkIfYouCannotCreateANewItemToTracker(REQUIREMENTS);
    }

    @Test(groups = {"dr"})
    public void testRisksWithDRLicense() {
        trackersPage.checkIfTracker(RISKS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(RISKS);
        checkIfYouCannotCreateANewThisKindOfTracker(RISK);
    }

    @Test(groups = {"dr"})
    public void testTasksWithDRLicense() {
        trackersPage.checkIfTracker(TASKS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TASKS);
        checkIfYouCannotCreateANewItemToTracker(TASKS);
    }

    @Test(groups = {"dr"})
    public void testTestRunsWithDRLicense() {
        trackersPage.checkIfTracker(TEST_RUNS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_RUNS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_RUN);
    }

    @Test(groups = {"dr"})
    public void testUserStoriesWithDRLicense() {
        trackersPage.checkIfTracker(USER_STORIES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(USER_STORIES);
        checkIfYouCannotCreateANewItemToTracker(USER_STORIES);
    }

    @Test(groups = {"dr"})
    public void testConfigurationItemsWithDRLicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(CONFIGURATION_ITEMS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(CONFIGURATION_ITEMS);
    }

    @Test(groups = {"dr"})
    public void testTestCasesWithDRLicense() {
        trackersPage.checkIfTracker(TEST_CASES, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_CASES);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_CASE);
    }

    @Test(groups = {"dr"})
    public void testReleasesWithDRLicense() {
        trackersPage.checkIfTracker(RELEASES, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(RELEASES);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(RELEASES);
    }

    @Test(groups = {"dr"})
    public void testComponentsWithDRLicense() {
        trackersPage.checkIfTracker(COMPONENTS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(COMPONENTS);
        checkIfYouCannotCreateANewThisKindOfTracker(COMPONENT);
    }

    @Test(groups = {"dr"})
    public void testPlatformsWithDRLicense() {
        trackersPage.checkIfTracker(PLATFORMS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(PLATFORMS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(PLATFORMS);
    }

    @Test(groups = {"dr"})
    public void testContactsWithDRLicense() {
        trackersPage.checkIfTracker(CONTACTS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(CONTACTS);
        checkIfYouCannotCreateANewThisKindOfTracker(CONTACT);
    }

    @Test(groups = {"dr"})
    public void testTestSetsWithDRLicense() {
        trackersPage.checkIfTracker(TEST_SETS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_SETS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(TEST_SETS);
    }

    @Test(groups = {"dr"})
    public void testTestConfigurationsWithDRLicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_CONFIGURATIONS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_CONFIGURATION);
    }

    @Test(groups = {"dr"})
    public void testTeamsWithDRLicense() {
        trackersPage.checkIfTracker(TEAMS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEAMS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(TEAMS);
    }

    @Test(groups = {"dr"})
    public void testTimeRecordsWithDRLicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCannotCreateANewThisKindOfTracker(TIME_RECORDING);
    }
    //</editor-fold>

    //<editor-fold desc="sd https://codebeamer.com/cb/issue/554450">
    @Test(groups = {"sd"})
    public void testIssuesWithSDLicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(ISSUES);
        checkIfYouCannotCreateANewThisKindOfTracker(ISSUE);
    }

    @Test(groups = {"sd"})
    public void testBugsWithSDLicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(BUGS);
        checkIfYouCannotCreateANewThisKindOfTracker(BUG);
    }

    @Test(groups = {"sd"})
    public void testChangeRequestsWithSDLicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(CHANGE_REQUESTS);
        checkIfYouCanAccessConfigurationPageOfTracker(CHANGE_REQUESTS);
    }

    @Test(groups = {"sd"})
    public void testRequirementsWithSDLicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(REQUIREMENTS);
        checkIfYouCannotCreateANewItemToTracker(REQUIREMENTS);
    }

    @Test(groups = {"sd"})
    public void testRisksWithSDLicense() {
        trackersPage.checkIfTracker(RISKS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(RISKS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(RISKS);
    }

    @Test(groups = {"sd"})
    public void testTasksWithSDLicense() {
        trackersPage.checkIfTracker(TASKS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TASKS);
        checkIfYouCannotCreateANewThisKindOfTracker(TASK);
    }

    @Test(groups = {"sd"})
    public void testTestRunsWithSDLicense() {
        trackersPage.checkIfTracker(TEST_RUNS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_RUNS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(TEST_RUNS);
    }

    @Test(groups = {"sd"})
    public void testUserStoriesWithSDLicense() {
        trackersPage.checkIfTracker(USER_STORIES, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(USER_STORIES);
        checkIfYouCannotCreateANewThisKindOfTracker(USER_STORY);
    }

    @Test(groups = {"sd"})
    public void testConfigurationItemsWithSDLicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(CONFIGURATION_ITEMS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(CONFIGURATION_ITEMS);
    }

    @Test(groups = {"sd"})
    public void testTestCasesWithSDLicense() {
        trackersPage.checkIfTracker(TEST_CASES, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_CASES);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_CASE);
    }

    @Test(groups = {"sd"})
    public void testReleasesWithSDLicense() {
        trackersPage.checkIfTracker(RELEASES, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(RELEASES);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(RELEASES);
    }

    @Test(groups = {"sd"})
    public void testComponentsWithSDLicense() {
        trackersPage.checkIfTracker(COMPONENTS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(COMPONENTS);
        checkIfYouCannotCreateANewThisKindOfTracker(COMPONENT);
    }

    @Test(groups = {"sd"})
    public void testPlatformsWithSDLicense() {
        trackersPage.checkIfTracker(PLATFORMS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(PLATFORMS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(PLATFORMS);
    }

    @Test(groups = {"sd"})
    public void testContactsWithSDLicense() {
        trackersPage.checkIfTracker(CONTACTS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(CONTACTS);
        checkIfYouCannotCreateANewThisKindOfTracker(CONTACT);
    }

    @Test(groups = {"sd"})
    public void testTestSetsWithSDLicense() {
        trackersPage.checkIfTracker(TEST_SETS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_SETS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(TEST_SETS);
    }

    @Test(groups = {"sd"})
    public void testTestConfigurationsWithSDLicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEST_CONFIGURATIONS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_CONFIGURATION);
    }

    @Test(groups = {"sd"})
    public void testTeamsWithSDLicense() {
        trackersPage.checkIfTracker(TEAMS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(TEAMS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(TEAMS);
    }

    @Test(groups = {"sd"})
    public void testTimeRecordsWithSDLicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCannotCreateANewThisKindOfTracker(TIME_RECORDING);
    }
    //</editor-fold>


    //<editor-fold desc="ag https://codebeamer.com/cb/issue/760974">
    @Test(groups = {"ag"})
    public void testIssuesWithAGLicense() {
        trackersPage.checkIfTracker(ISSUES, visible);
        checkIfYouCanCreateANewItemToTracker(ISSUES);
        checkIfYouCanCreateANewThisKindOfTracker(ISSUE);
    }

    @Test(groups = {"ag"})
    public void testBugsWithAGLicense() {
        trackersPage.checkIfTracker(BUGS, visible);
        checkIfYouCanCreateANewItemToTracker(BUGS);
        checkIfYouCanAccessConfigurationPageOfTracker(BUGS);
    }

    @Test(groups = {"ag"})
    public void testChangeRequestsWithAGLicense() {
        trackersPage.checkIfTracker(CHANGE_REQUESTS, visible);
        checkIfYouCanCreateANewItemToTracker(CHANGE_REQUESTS);
        checkIfYouCanCreateANewThisKindOfTracker(CHANGE_REQUEST);
    }

    @Test(groups = {"ag"})
    public void testRequirementsWithAGLicense() {
        trackersPage.checkIfTracker(REQUIREMENTS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(REQUIREMENTS);
        checkIfYouCannotCreateANewThisKindOfTracker(REQUIREMENT);
    }

    @Test(groups = {"ag"})
    public void testRisksWithAGLicense() {
        trackersPage.checkIfTracker(RISKS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(RISKS);
        checkIfYouCannotCreateANewItemToTracker(RISKS);
    }

    @Test(groups = {"ag"})
    public void testTasksWithAGLicense() {
        trackersPage.checkIfTracker(TASKS, visible);
        checkIfYouCanCreateANewItemToTracker(TASKS);
        checkIfYouCanCreateANewThisKindOfTracker(TASK);
    }

    @Test(groups = {"ag"})
    public void testTestRunsWithAGLicense() {
        trackersPage.checkIfTracker(TEST_RUNS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_RUNS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_RUN);
    }

    @Test(groups = {"ag"})
    public void testUserStoriesWithAGLicense() {
        trackersPage.checkIfTracker(USER_STORIES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(USER_STORIES);
        checkIfYouCanCreateANewItemToTracker(USER_STORIES);
    }

    @Test(groups = {"ag"})
    public void testConfigurationItemsWithAGLicense() {
        trackersPage.checkIfTracker(CONFIGURATION_ITEMS, visible);
        checkIfYouCanCreateANewItemToTracker(CONFIGURATION_ITEMS);
        checkIfYouCanAccessConfigurationPageOfTracker(CONFIGURATION_ITEMS);
    }

    @Test(groups = {"ag"})
    public void testTestCasesWithAGLicense() {
        trackersPage.checkIfTracker(TEST_CASES, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_CASES);
        checkIfYouCannotCreateANewItemToTracker(TEST_CASES);
    }

    @Test(groups = {"ag"})
    public void testReleasesWithAGLicense() {
        trackersPage.checkIfTracker(RELEASES, visible);
        checkIfYouCanCreateANewItemToTrackerReleases();
        checkIfYouCanCreateANewThisKindOfTracker(RELEASE);
    }

    @Test(groups = {"ag"})
    public void testComponentsWithAGLicense() {
        trackersPage.checkIfTracker(COMPONENTS, visible);
        checkIfYouCanCreateANewItemToTracker(COMPONENTS);
        checkIfYouCanAccessConfigurationPageOfTracker(COMPONENTS);
    }

    @Test(groups = {"ag"})
    public void testPlatformsWithAGLicense() {
        trackersPage.checkIfTracker(PLATFORMS, visible);
        checkIfYouCanCreateANewItemToTracker(PLATFORMS);
        checkIfYouCanCreateANewThisKindOfTracker(PLATFORM);
    }

    @Test(groups = {"ag"})
    public void testContactsWithAGLicense() {
        trackersPage.checkIfTracker(CONTACTS, hidden);
        checkIfYouCannotAccessTrackerWithDirectUrl(CONTACTS);
        checkIfYouCannotAccessConfigurationPageWithDirectUrl(CONTACTS);
    }

    @Test(groups = {"ag"})
    public void testTestSetsWithAGLicense() {
        trackersPage.checkIfTracker(TEST_SETS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_SETS);
        checkIfYouCannotCreateANewThisKindOfTracker(TEST_SET);
    }

    @Test(groups = {"ag"})
    public void testTestConfigurationsWithAGLicense() {
        trackersPage.checkIfTracker(TEST_CONFIGURATIONS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEST_CONFIGURATIONS);
        checkIfYouCannotCreateANewItemToTracker(TEST_CONFIGURATIONS);
    }

    @Test(groups = {"ag"})
    public void testTeamsWithAGLicense() {
        trackersPage.checkIfTracker(TEAMS, visible);
        checkIfYouCanAccessTrackerAndSeeItems(TEAMS);
        checkIfYouCanCreateANewThisKindOfTracker(TEAM);
    }

    @Test(groups = {"ag"})
    public void testTimeRecordsWithAGLicense() {
        trackersPage.checkIfTracker(TIMEKEEPING, visible);
        checkIfYouCanCreateANewItemToTracker(TIMEKEEPING);
        checkIfYouCanAccessConfigurationPageOfTracker(TIMEKEEPING);
    }
    //</editor-fold>


    private void checkIfYouCanSeeTagsMenu() {
        //starts at Trackers
        MyStartPage myStartPage = trackersPage.clickOnMyStartPage();
        addTagDialog = myStartPage.clickOnTags();
        switchTo().frame("inlinedPopupIframe");
        assertTrue(addTagDialog.isPageLoaded());
        addTagDialog.clickOnCancel();
        switchTo().defaultContent();
        systemAdminPage = myStartPage.clickOnSystemAdmin();
        //ends at System Admin
    }

    private void checkIfYouCanSeeDocumentsLink() {
        //starts at System Admin
        documentsPage = systemAdminPage.clickOnDocumentsLink();
        assertTrue(documentsPage.isPageLoaded());
        documentsPage.clickOnSystemAdmin();
        //ends at System Admin
    }

    private void checkIfYouCannotSetManagedRepositoryAccessURLs() {
        //starts at System Admin
        documentsPage.clickOnSystemAdmin();
        systemAdminPage.checkIfSetManagedRepositoryAccessURLs(hidden);
        //ends at
    }

    private void checkIfYouCanSetManagedRepositoryAccessURLs() {
        //starts at System Admin
        //documentsPage.clickOnSystemAdmin();
        SetManagedRepositoryPage setManagedRepositoryPage = systemAdminPage.clickOnSetManagedRepository();
        assertTrue(setManagedRepositoryPage.isPageLoaded());
        setManagedRepositoryPage.clickOnCancel();
        //ends at System Admin
    }

    private void checkIfYouCanSeeUserGroupsMenu() {
        //starts at System Admin
        UserGroupsPage userGroupsPage = systemAdminPage.clickOnUserGroups();
        userGroupsPage.clickOnNewGroup(); //implicit check
        userGroupsPage.clickOnCancel();
        userGroupsPage.clickOnSystemAdmin();
        //ends at System Admin
    }

    private void checkIfYouCanSeeLicenseMenu() {
        //starts at System Admin
        LicensePage licensePage = systemAdminPage.clickOnLicense();
        EditLicensePage editLicensePage = licensePage.clickOnEditLicense();
        editLicensePage.clickOnCancel();
        editLicensePage.clickOnSystemAdmin();
        //ends at System Admin
    }

    private void checkIfYouCanSeeWikiMenu() {
        //starts at System Admin
        ProjectsPage projectsPage = systemAdminPage.clickOnProjects();
        projectsPage.clickOnCompactList();
        projectWikiPage = projectsPage.clickOnProject(PROJECT_NAME);
        projectWikiPage.leftPane.filter("The Kanban Board");
        projectWikiPage.leftPane.getAllLeftTreeItems().shouldHave(texts(
                "Welcome to " + PROJECT_NAME,
                "The Kanban Board",
                "Working Agile at Team level",
                "Kanban board",
                "Cardboard view",
                "WIP Limits"));
        NewChildWikiDialog newChildWikiDialog = projectWikiPage.centerPane.clickOnNewChildPage();
        switchTo().frame("inlinedPopupIframe");
        newChildWikiDialog.clickOnCancel();
        projectWikiPage.leftPane.clickOnLeftTreeItem("The Kanban Board", 1);
        UpdateWikiPageDialog updateWikiPageDialog = projectWikiPage.centerPane.clickOnEdit();
        Helper.switchToWindowByRegex("The Kanban Board Updating Wiki page");
        updateWikiPageDialog.clickOnCancel();
        switchTo().window(0);
        //ends at Wiki
    }

    private void checkIfYouCanEditViaOfficeOnWiki() {
        //starts at Wiki
        projectWikiPage.centerPane.checkIfEditViaOffice(visible);
        //ends at Wiki
    }

    private void checkIfYouCannotEditViaOfficeOnWiki() {
        //starts at Wiki
        projectWikiPage.centerPane.checkIfEditViaOffice(hidden);
        //ends at Wiki
    }

    private void checkIfYouCanCreateLabelForWikiPage() {
        //starts at Wiki
        addTagDialog = projectWikiPage.centerPane.clickOnTags();
        switchTo().frame("inlinedPopupIframe");
        addTagDialog.clickOnCancel();
        switchTo().defaultContent();
        //ends at Wiki
    }

    private void checkIfYouCanSeeReportsMenu() {
        //starts at Wiki
        //You ${Reports} see "Reports" menu. You ${Reports} create and run reports.
        ReportsPage reportsPage = projectWikiPage.clickOnReports();
        assertTrue(reportsPage.isPageLoaded());
        reportsPage.checkIfNewReport(visible);
        back();
        //ends at Wiki
    }

    private void checkIfYouCanSeeSCMRepositories() {
        //starts at Wiki
        ScmRepositoriesPage scmRepositoriesPage = projectWikiPage.clickOnScmRepositories();
        ScmProjectSettingsPage scmProjectSettingsPage = scmRepositoriesPage.clickOnNewRepository();
        scmProjectSettingsPage.clickOnConfigure();
        scmProjectSettingsPage.clickOnCancel();
        //ends at SCM Repositories
    }

    private void checkIfYouCannotSeeSCMRepositories() {
        //starts at Wiki
        projectWikiPage.checkIfSCMRepositories(hidden);
        //ends at SCM Repositories
    }

    private void checkIfYouCanSeeBaselines() {
        //starts at SCM Repositories
        BaselinesPage baselinesPage = projectWikiPage.clickOnBaselines();
        NewBaselineDialog NewBaselineDialog = baselinesPage.clickOnNewBaseline();
        NewBaselineDialog.clickOnCancel();
        projectWikiPage = baselinesPage.clickOnWiki();
        //ends at Wiki
    }

    private void checkIfYouCannotSeeBaselines() {
        projectWikiPage.checkIfBaselines(hidden);
    }

    private void checkIfYouCanSeeDocuments() {
        //starts at Wiki
        projectWikiPage.checkIfDocuments(visible);
        //ends at Wiki
    }

    private void checkIfYouCannotSeeDocuments() {

    }

    private void checkIfYouCanSeeGroupsInMembers() {
        //starts at Wiki
        membersPage = projectWikiPage.clickOnAdminMembers();
        AddNewMemberDialog addNewMemberDialog = membersPage.clickOnAddNewMember();
        switchTo().frame("inlinedPopupIframe");
        addNewMemberDialog.clickOnCancel();
        switchTo().defaultContent();
        AddNewGroupDialog addNewGroupDialog = membersPage.clickOnAddNewGroup();
        switchTo().frame("inlinedPopupIframe");
        addNewGroupDialog.clickOnCancel();
        switchTo().defaultContent();
        projectAdminSettingsPage = membersPage.clickOnAdmin();
        //ends at Admin
    }

    private void checkIfYouCanSeeApprovalWorfklow() {
        projectAdminSettingsPage.checkIfApprovalWorkflowsTab(visible);
    }

    private void checkIfYouCannotSeeApprovalWorfklow() {
        //starts at Admin
        projectAdminSettingsPage.checkIfApprovalWorkflowsTab(hidden);
        //ends at Admin
    }

    private void checkIfYouCanSeeEscalation() {
        //starts at
        projectAdminSettingsPage.checkIfCalendarTab(visible);
        trackersPage = projectAdminSettingsPage.clickOnTrackers();
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Requirements");
        trackersCustomizationPage = (TrackersCustomizationPage) trackerItemListPage.clickOnMoreMenuItem(MoreMenuHelper.MoreMenuItem.CUSTOMIZE);
        TrackersCustomizationPage.EscalationTab escalationTab = (TrackersCustomizationPage.EscalationTab) trackersCustomizationPage.clickOnTab(TrackersCustomizationPage.TabTypes.ESCALATION);
        escalationTab.clickOnSave();
        //trackerItemListPage.clickOnTrackers();
        //
    }

    private void checkIfYouCannotSeeEscalation() {
        //starts at Admin
        projectAdminSettingsPage.checkIfCalendarTab(hidden);
        trackersPage = projectAdminSettingsPage.clickOnTrackers();
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Requirements");
        trackersCustomizationPage = (TrackersCustomizationPage) trackerItemListPage.clickOnMoreMenuItem(MoreMenuHelper.MoreMenuItem.CUSTOMIZE);
        TrackersCustomizationPage.EscalationTab escalationTab = (TrackersCustomizationPage.EscalationTab) trackersCustomizationPage.clickOnTab(TrackersCustomizationPage.TabTypes.ESCALATION);
        escalationTab.getWarning().shouldHave(text("You cannot use this feature because you don't have the Escalation license."));
        //trackersCustomizationPage.clickOnTrackers();
        //ends at Trackers customization
    }

    private void checkIfYouCanSeeServiceDesk() {
        //starts at
        TrackersCustomizationPage.ServiceDeskTab serviceDeskTab = (TrackersCustomizationPage.ServiceDeskTab) trackersCustomizationPage.clickOnTab(TrackersCustomizationPage.TabTypes.SERVICE_DESK);
        serviceDeskTab.clickOnSave();
        //
    }

    private void checkIfYouCannotSeeServiceDesk() {
        //starts at Trackers customization
        TrackersCustomizationPage.ServiceDeskTab serviceDeskTab = (TrackersCustomizationPage.ServiceDeskTab) trackersCustomizationPage.clickOnTab(TrackersCustomizationPage.TabTypes.SERVICE_DESK);
        serviceDeskTab.getWarning().shouldHave(text("You cannot use this feature because you don't have the necessary license."));
        //ends at Trackers customization
    }

    private void checkIfYouCanSeeTimeTracking() {
        //starts at Trackers customization
        trackersPage = trackersCustomizationPage.clickOnTrackers();
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Tasks");
        tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        SubmitWorkItemPage submitWorkItemPage = (SubmitWorkItemPage) tableViewPage.clickOnContextMenuItemOfItem("Update platform 20", 1, TableViewPage.ContextMenuItem.EDIT);
        submitWorkItemPage.clickOnAll();
        submitWorkItemPage.checkIfSpentEffort(Condition.disabled);
        submitWorkItemPage.clickOnCancel();
        back();
        back();
        //submitWorkItemPage.clickOnTrackers();
        //ends at Trackers Tasks table view
    }

    private void checkIfYouCanSeeExportImportToWord() {
        //starts at Trackers
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Tasks");
        tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        ExportToOfficeDialogPage exportToOfficeDialog = (ExportToOfficeDialogPage) tableViewPage.clickOnMoreMenuItem(MoreMenuHelper.MoreMenuItem.EXPORT_TO_OFFICE);
        switchTo().frame("inlinedPopupIframe");
        ExportToOfficeDialogPage.WordTab wordTab = exportToOfficeDialog.clickOnWordTab();
        wordTab.checkIfExport(visible);
        wordTab.clickOnCancel();
        switchTo().defaultContent();
        tableViewPage.clickOnTrackers();
        //ends at Trackers
    }

    private void checkIfYouCannotSeeExportImportToWord() {
        //starts at Trackers
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Tasks");
        tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        tableViewPage.checkIfMoreMenuItem(MoreMenuHelper.MoreMenuItem.EXPORT_TO_OFFICE, hidden);
        Helper.clickAway();
        tableViewPage.clickOnTrackers();
        //ends at Trackers
    }

    private void checkIfYouCanSeeEditViaOfficeLink() {
        //starts at Trackers Tasks table view
        trackerItemDetailsPage = tableViewPage.openItem("ewu", 1);
        trackerItemDetailsPage.checkIfMoreMenuItem(MoreMenuHelper.MoreMenuItem.EDIT_VIA_OFFICE, visible);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();
        //ends at Trackers
    }

    private void checkIfYouCannotSeeEditViaOfficeLink() {
        //starts at Trackers Tasks table view
        trackerItemDetailsPage = tableViewPage.openItem("ewu", 1);
        trackerItemDetailsPage.checkIfMoreMenuItem(MoreMenuHelper.MoreMenuItem.EDIT_VIA_OFFICE, hidden);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();
        //
    }

    private void checkIfYouCanUseDocumentView() {
        //starts at Trackers
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Requirements");
        documentViewPage = (DocumentViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DOCUMENT_VIEW);
        documentViewPage.isPageLoaded();
        documentViewPage.getWarning().shouldHave(not(text("You cannot use this feature because you don't have the Document View license")));
        //ends at Trackers Requirements Document view
    }

    private void checkIfYouCannotUseDocumentView() {
        //starts at Trackers
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Requirements");
        documentViewPage = (DocumentViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DOCUMENT_VIEW);
        documentViewPage.getWarning().shouldHave(text("You cannot use this feature because you don't have the Document View license"));
        //ends at Trackers Requirements Document view
    }

    private void checkIfYouCanUseTraceabilityBrowser() {
        //starts at Trackers Requirements Document view
        TraceabilityBrowserPage traceabilityBrowserPage = (TraceabilityBrowserPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TRACEABILITY_BROWSER);
        traceabilityBrowserPage.isPageLoaded();
        traceabilityBrowserPage.getWarning().shouldHave(not(text("You cannot use this feature because you don't have the Traceability Browser license")));
        back();
        back();
        //ends at Trackers Requirements Table view
    }

    private void checkIfYouCannotUseTraceabilityBrowser() {
        //starts at Trackers Requirements Document view
        TraceabilityBrowserPage traceabilityBrowserPage = (TraceabilityBrowserPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TRACEABILITY_BROWSER);
        traceabilityBrowserPage.getWarning().shouldHave(text("You cannot use this feature because you don't have the Traceability Browser license"));
        back();
        back();
        //ends at Trackers Requirements Table view
    }

    private void checkIfYouCanGenerateRisk() {
        //starts at Trackers Requirements Document view
        trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        trackerItemDetailsPage = tableViewPage.openItem("test req b3", 1);
        trackerItemDetailsPage.checkIfGenerateRisk(visible);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();
        trackersPage.checkIfTracker("Risks", visible);
        //ends at Trackers

    }

    private void checkIfYouCannotGenerateRisk() {
        //starts at Trackers Requirements Table view
        trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        trackerItemDetailsPage = tableViewPage.openItem("test req b3", 1);
        trackerItemDetailsPage.checkIfGenerateRisk(hidden);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();
//        trackersPage.checkIfTracker("Risks", hidden);
        //ends at Trackers
    }

    private void checkIfYouCanRunNewTest() {

    }

    private void checkIfYouCannotRunNewTest() {
        //starts at Trackers
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Test Runs");
        tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        trackerItemDetailsPage = tableViewPage.openItem(1);
        trackerItemDetailsPage.checkIfEdit(hidden);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();

        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Test Sets");
        tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        trackerItemDetailsPage = tableViewPage.openItem(1);
        trackerItemDetailsPage.checkIfEdit(hidden);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();

        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Test Cases");
        tableViewPage = (TableViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TABLE_VIEW);
        //tableViewPage.checkIfNewTestRun(hidden);
        tableViewPage.tickItem(1, true);
        tableViewPage.clickOnNewTestRun();
        AccessDeniedPage accessDeniedPage = page(AccessDeniedPage.class);
        accessDeniedPage.getErrorMessages().shouldHave(texts("is not authorized to edit items in this tracker"));
        accessDeniedPage.clickOnBack();
        trackerItemDetailsPage = tableViewPage.openItem(1);
        trackerItemDetailsPage.checkIfEdit(hidden);
        trackersPage = trackerItemDetailsPage.clickOnTrackers();

        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Requirements");
        TestCoveragePage testCoveragePage = (TestCoveragePage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.TEST_COVERAGE);
        testCoveragePage.getWarningMessages().shouldHave(texts("You cannot use this feature because you don't have the Test Management license"));
        trackersPage = trackerItemDetailsPage.clickOnTrackers();
        //ends at Trackers
    }

    private void checkIfYouCanSeeGantChart() {
        //starts at
        trackerItemListPage = trackersPage.openTrackerFromLeftTree(RELEASES);
        dashboardViewPage = (DashboardViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DASHBOARD);
        ReleaseDetailsPage releaseDetailsPage = dashboardViewPage.openRelease("2.0");
        releaseDetailsPage.clickOnReleaseGantChartPanel(true);
        releaseDetailsPage.checkIfGantChartRenderingMode(visible);
        //
    }

    private void checkIfYouCannotSeeGantChart() {
        //starts at Trackers
        trackerItemListPage = trackersPage.openTrackerFromLeftTree(RELEASES);
        dashboardViewPage = (DashboardViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DASHBOARD);
        ReleaseDetailsPage releaseDetailsPage = dashboardViewPage.openRelease("2.0");
        releaseDetailsPage.clickOnReleaseGantChartPanel(true);
        releaseDetailsPage.getWarning().shouldHave(text("You cannot use this feature because you don't have the ALM license"));
//        releaseDetailsPage.checkIfGantChartRenderingMode(visible);
        //ends at Trackers Releases
    }

    private void checkIfYouCanSeeKanbanBoard() {
        //starts at
        KanbanBoardPage kanbanBoardPage = (KanbanBoardPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.KANBAN_BOARD);
        assertTrue(kanbanBoardPage.isPageLoaded(), "You cannot see Kanban Board");
        kanbanBoardPage.getWarning().shouldHave(not(text("To use all features of this page (filtering, adding new item, organizing issues) you need an Agile license")));
        //
    }

    private void checkIfYouCannotSeeKanbanBoard() {
        //starts at Trackers Releases
        kanbanBoardPage = (KanbanBoardPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.KANBAN_BOARD);
        //assertTrue(kanbanBoardPage.isPageLoaded(), "You cannot see Kanban Board");
        kanbanBoardPage.getWarning().shouldHave(text("To use all features of this page (filtering, adding new item, organizing issues) you need an Agile license"));
        //ends at Trackers Releases Kanban board
    }

    private void checkIfYouCanCreateNewSprint() {
        //starts at Trackers Releases Kanban board
        PlanViewPage planViewPage = (PlanViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.PLAN_VIEW);
        NewSprintDialog newSprintDialog = planViewPage.clickOnNewSprint();
        switchTo().frame("inlinedPopupIframe");
        newSprintDialog.clickOnCancel();
        switchTo().defaultContent();
        //ends at Trackers Releases Plan view
    }

    private void checkIfYouCannotCreateNewSprint() {
        //starts at Trackers Releases Kanban board
        dashboardViewPage = (DashboardViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DASHBOARD);
        dashboardViewPage.checkIfNewSprint(hidden);
        //ends at Trackers Releases Dashboard view
    }

    @Test(groups = "collab")
    public void testFeaturesWithCollabLicense() {
        //You ${Evaluation} see evaluation warning in the header.
        trackersPage.checkIfEvaluationWarning(hidden);
        //You ${Labels} see "Tags" menu and ${Labels} open it.
        checkIfYouCanSeeTagsMenu();
        //You ${Documents} see "Documents" link and ${Documents} open it.
        checkIfYouCanSeeDocumentsLink();
        //You ${Scm} Set Managed Repository Access URLs.
        checkIfYouCannotSetManagedRepositoryAccessURLs();
        //You ${UserGroups} see "User Groups" menu, you ${UserGroups} manage groups.
        checkIfYouCanSeeUserGroupsMenu();
        //You ${CustomLicense} see "License" menu and ${CustomLicense} add new license.
        checkIfYouCanSeeLicenseMenu();
        //You ${Wikispace} see "Wiki" menu. You ${Wikispace} search / create / edit wiki page.
        checkIfYouCanSeeWikiMenu();
        //You ${EditinWord} see "Edit via Office" link and ${EditinWord} use it.

        //You ${Labels} create label for wiki page.
        //You ${Reports} see "Reports" menu. You ${Reports} create and run reports.
        checkIfYouCanCreateLabelForWikiPage();
        checkIfYouCanSeeReportsMenu();
        //You ${Scm} see "SCM" menu. You ${Scm} create new SCM repositories.
        checkIfYouCannotSeeSCMRepositories();
        //You ${Baselines} see "Baselines" menu. You ${Baselines} create new baseline.
        checkIfYouCannotSeeBaselines();
        //You ${Documents} see "Documents" menu.
        checkIfYouCanSeeDocuments();
        //You ${UserGroups} see groups, you ${UserGroups} new group and ${UserGroups} add user to a group.
        checkIfYouCanSeeGroupsInMembers();
        //You ${DocumentAproval} see "Approval Workflows" tab.
        checkIfYouCannotSeeApprovalWorfklow();
        //You see project calendar / escalation tab and ${Escalation} use it. If not you can see a warning message (user ha no license for the feature).
        checkIfYouCannotSeeEscalation();
        //You ${ServiceDesk} see Service Desk tab, and ${ServiceDesk} edit / access.
        checkIfYouCannotSeeServiceDesk();
        //You ${Trackers} see "Trackers" menu.
        //You ${TimeTracking} set spent effort to the item.
        checkIfYouCanSeeTimeTracking();
        //You ${EditinWord} see Office "Edit" link and ${EditinWord} use it.
        checkIfYouCannotSeeEditViaOfficeLink();
        //You ${TrackerWordImport} export/imprt tracker to Word.
        checkIfYouCannotSeeExportImportToWord();
        //TODO You ${Watermark} see watermark in a pdf durin evaluation.
        //You ${TrackerDocumentView} use Document View. If not you can see a warning message (user ha no license for the feature).
        checkIfYouCannotUseDocumentView();
        //You ${TraceabilityBrowser} see and use Traceability Browser.
        checkIfYouCannotUseTraceabilityBrowser();
        //You ${RM} edit trackers, you ${RM} generate risk to requirement.
        checkIfYouCannotGenerateRisk();
        //You ${TM} edit test trackers, ${TM} run new test run and you ${TM} open test coverage.
        //checkIfYouCannotRunNewTest();
        trackersPage.checkIfTracker("Test Runs", hidden);
        trackersPage.checkIfTracker("Test Sets", hidden);
        trackersPage.checkIfTracker("Test Cases", hidden);
        //You can't see releases tracker.
        trackersPage.checkIfTracker("Releases", hidden);
    }

    @Test(groups = {"collab", "rm", "qa", "ag", "sd"})
    public void testIfSCMRepoCreationIsNotPossibleWithGivenLicense() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
        String projectName = "test-license" + RandomStringUtils.randomAlphabetic(5) + dateFormat.format(new Date().getTime());
        Helper.loginWithUser(USERNAME, USERNAME);
        CreateProjectPage createProjectPage = open("/createProject.spr", CreateProjectPage.class);
        createProjectPage.tickProjectType(CreateProjectPage.ProjectTypeOptions.NEW_PROJECT);
        createProjectPage.clickOnNext();
        createProjectPage = page(CreateProjectPage.class);
        createProjectPage.setName(projectName);
        //implicitly check if scm repo creation is possible
        createProjectPage.checkIfNext(hidden.because("You can create new SCM repository"));
    }

    @Test(groups = {"alm", "dm"})
    public void testIfSCMRepoCreationIsPossibleWithGivenLicense() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
        String projectName = "test-license" + RandomStringUtils.randomAlphabetic(5) + dateFormat.format(new Date().getTime());
        Helper.loginWithUser(USERNAME, USERNAME);
        CreateProjectPage createProjectPage = open("/createProject.spr", CreateProjectPage.class);
        createProjectPage.tickProjectType(CreateProjectPage.ProjectTypeOptions.NEW_PROJECT);
        createProjectPage.clickOnNext();
        createProjectPage = page(CreateProjectPage.class);
        createProjectPage.setName(projectName);
        createProjectPage.clickOnNext();
        ScmProjectSettingsPage scmProjectSettingsPage = page(ScmProjectSettingsPage.class);
        scmProjectSettingsPage.selectGit();
        RepositoryManagementPage repositoryManagementPage = scmProjectSettingsPage.clickOnNext();
        repositoryManagementPage.selectRepositoryOption(RepositoryManagementPage.RepositoryManagementOptions.NEW_MANAGED_REPO);
        repositoryManagementPage.clickOnNext();
        NewManagedRepositoryPage newManagedRepositoryPage = page(NewManagedRepositoryPage.class);
        assertTrue(newManagedRepositoryPage.isPageLoaded(), "You cannot create new SCM repository");
    }

    @Test(groups = "alm")
    public void testFeaturesWithALMLicense() {
        //You ${Evaluation} see evaluation warning in the header.
        trackersPage.checkIfEvaluationWarning(visible);
        checkIfYouCanSeeTagsMenu();
        checkIfYouCanSeeDocumentsLink();
        checkIfYouCanSetManagedRepositoryAccessURLs();
        checkIfYouCanSeeUserGroupsMenu();
        checkIfYouCanSeeLicenseMenu();
        checkIfYouCanSeeWikiMenu();
        projectWikiPage.centerPane.checkIfEditViaOffice(visible);
        checkIfYouCanCreateLabelForWikiPage();
        checkIfYouCanSeeReportsMenu();
        checkIfYouCanSeeSCMRepositories();
        checkIfYouCanSeeBaselines();
        checkIfYouCanSeeDocuments();
        checkIfYouCanSeeGroupsInMembers();
        checkIfYouCanSeeApprovalWorfklow();
        checkIfYouCanSeeEscalation();
        checkIfYouCanSeeServiceDesk();
        checkIfYouCanSeeTimeTracking();
        checkIfYouCanSeeEditViaOfficeLink();
        checkIfYouCanSeeExportImportToWord();
        checkIfYouCanUseDocumentView();
        checkIfYouCanUseTraceabilityBrowser();
        checkIfYouCanGenerateRisk();
        checkIfYouCanSeeGantChart();
        checkIfYouCanCreateNewSprint();
        checkIfYouCanSeeKanbanBoard();
    }

    @Test(groups = "dm")
    public void testFeaturesWithDMLicense() {
        trackersPage.checkIfEvaluationWarning(hidden);
        checkIfYouCanSeeTagsMenu();
        checkIfYouCanSeeDocumentsLink();
        checkIfYouCanSetManagedRepositoryAccessURLs();
        checkIfYouCanSeeUserGroupsMenu();
        checkIfYouCanSeeLicenseMenu();
        checkIfYouCanSeeWikiMenu();
        checkIfYouCanEditViaOfficeOnWiki();
        checkIfYouCanCreateLabelForWikiPage();
        checkIfYouCanSeeReportsMenu();
        checkIfYouCanSeeSCMRepositories();
        checkIfYouCanSeeBaselines();
        checkIfYouCanSeeDocuments();
        checkIfYouCanSeeGroupsInMembers();
        checkIfYouCannotSeeApprovalWorfklow();
        checkIfYouCannotSeeEscalation();
        checkIfYouCannotSeeServiceDesk();
        checkIfYouCanSeeTimeTracking();
        checkIfYouCanSeeEditViaOfficeLink();
        checkIfYouCannotSeeExportImportToWord();
        checkIfYouCannotUseDocumentView();
        checkIfYouCannotUseTraceabilityBrowser();
        checkIfYouCannotGenerateRisk();
        checkIfYouCannotRunNewTest();
        checkIfYouCannotSeeGantChart();
        checkIfYouCannotSeeKanbanBoard();
        checkIfYouCannotCreateNewSprint();
    }

    @Test(groups = "rm")
    public void testFeaturesWithRMLicense() {
        trackersPage.checkIfEvaluationWarning(hidden);
        checkIfYouCanSeeTagsMenu();
        checkIfYouCanSeeDocumentsLink();
        checkIfYouCannotSetManagedRepositoryAccessURLs();
        checkIfYouCanSeeUserGroupsMenu();
        checkIfYouCanSeeLicenseMenu();
        checkIfYouCanSeeWikiMenu();
        checkIfYouCanEditViaOfficeOnWiki();
        checkIfYouCanCreateLabelForWikiPage();
        checkIfYouCanSeeReportsMenu();
        checkIfYouCannotSeeSCMRepositories();
        checkIfYouCanSeeBaselines();
        checkIfYouCanSeeDocuments();
        checkIfYouCanSeeGroupsInMembers();
        checkIfYouCannotSeeApprovalWorfklow();
        checkIfYouCannotSeeEscalation();
        checkIfYouCannotSeeServiceDesk();
        checkIfYouCanSeeTimeTracking();
        checkIfYouCanSeeEditViaOfficeLink();
        checkIfYouCanSeeExportImportToWord();
        checkIfYouCanUseDocumentView();
        checkIfYouCanUseTraceabilityBrowser();
        checkIfYouCanGenerateRisk();
        checkIfYouCannotRunNewTest();
        checkIfYouCannotSeeGantChart();
        checkIfYouCannotSeeKanbanBoard();
        checkIfYouCannotCreateNewSprint();
    }

    @Test(groups = "qa")
    public void testFeaturesWithQALicense() {
        trackersPage.checkIfEvaluationWarning(hidden);
        checkIfYouCanSeeTagsMenu();
        checkIfYouCanSeeDocumentsLink();
        checkIfYouCannotSetManagedRepositoryAccessURLs();
        checkIfYouCanSeeUserGroupsMenu();
        checkIfYouCanSeeLicenseMenu();
        checkIfYouCanSeeWikiMenu();
        checkIfYouCanEditViaOfficeOnWiki();
        checkIfYouCanCreateLabelForWikiPage();
        checkIfYouCanSeeReportsMenu();
        checkIfYouCannotSeeSCMRepositories();
        checkIfYouCanSeeBaselines();
        checkIfYouCanSeeDocuments();
        checkIfYouCanSeeGroupsInMembers();
        checkIfYouCannotSeeApprovalWorfklow();
        checkIfYouCannotSeeEscalation();
        checkIfYouCannotSeeServiceDesk();
        checkIfYouCanSeeTimeTracking();
        checkIfYouCanSeeEditViaOfficeLink();
        checkIfYouCanSeeExportImportToWord();
        checkIfYouCanUseDocumentView();
        checkIfYouCannotUseTraceabilityBrowser();
        checkIfYouCannotGenerateRisk();
        checkIfYouCanRunNewTest();
        checkIfYouCannotSeeGantChart();
        checkIfYouCannotSeeKanbanBoard();
        checkIfYouCannotCreateNewSprint();
    }

    @Test(groups = "sd")
    public void testFeaturesWithSDLicense() {
        trackersPage.checkIfEvaluationWarning(hidden);
        checkIfYouCanSeeTagsMenu();
        checkIfYouCanSeeDocumentsLink();
        checkIfYouCannotSetManagedRepositoryAccessURLs();
        checkIfYouCanSeeUserGroupsMenu();
        checkIfYouCanSeeLicenseMenu();
        checkIfYouCanSeeWikiMenu();
        checkIfYouCannotEditViaOfficeOnWiki();

    }

    @Test(groups = "ag")
    public void testFeaturesWithAGLicense() {
        trackersPage.checkIfEvaluationWarning(hidden);
        checkIfYouCanSeeTagsMenu();
        checkIfYouCanSeeDocumentsLink();
        checkIfYouCannotSetManagedRepositoryAccessURLs();
        checkIfYouCanSeeUserGroupsMenu();
        checkIfYouCanSeeLicenseMenu();
        checkIfYouCanSeeWikiMenu();
        checkIfYouCannotEditViaOfficeOnWiki();
        checkIfYouCanCreateLabelForWikiPage();
        checkIfYouCanSeeReportsMenu();
        checkIfYouCannotSeeSCMRepositories();
        checkIfYouCanSeeBaselines();
        checkIfYouCanSeeDocuments();
        checkIfYouCanSeeGroupsInMembers();
        checkIfYouCannotSeeApprovalWorfklow();
        checkIfYouCannotSeeEscalation();
        checkIfYouCannotSeeServiceDesk();
        checkIfYouCanSeeTimeTracking();
        checkIfYouCannotSeeEditViaOfficeLink();
        checkIfYouCannotSeeExportImportToWord();
        checkIfYouCannotUseDocumentView();
        checkIfYouCannotUseTraceabilityBrowser();
        checkIfYouCannotGenerateRisk();
        checkIfYouCannotRunNewTest();
        checkIfYouCannotSeeGantChart();
        checkIfYouCanSeeKanbanBoard();
        checkIfYouCanCreateNewSprint();

    }
}
