package com.intland.codebeamer.functionaltest.test;

import com.intland.codebeamer.functionaltest.helper.Helper;
import com.intland.codebeamer.functionaltest.page.mystart.MyStartPage;
import com.intland.codebeamer.functionaltest.page.projects.ProjectsPage;
import com.intland.codebeamer.functionaltest.page.trackers.TrackerItemDetailsPage;
import com.intland.codebeamer.functionaltest.page.trackers.TrackerItemListPage;
import com.intland.codebeamer.functionaltest.page.trackers.TrackersPage;
import com.intland.codebeamer.functionaltest.page.trackers.documentview.DocumentViewPage;
import com.intland.codebeamer.functionaltest.page.wiki.ProjectWikiPage;
import org.junit.Test;
import org.testng.annotations.BeforeMethod;

import javax.print.Doc;

/**
 * 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 firstSixProductLicense agreement
 * you entered into with Intland.
 */
public class TestManagementTests extends BaseTest {

    private TrackerItemListPage trackerItemListPage;

    @BeforeMethod
    public void beforeMethod(){
        MyStartPage myStartPage = Helper.loginWithSystemAdmin();
        ProjectsPage projectsPage = myStartPage.clickOnProjects();
        projectsPage.clickOnCompactList();
        ProjectWikiPage projectWikiPage = projectsPage.clickOnProject("test-selenium");
        TrackersPage trackersPage = projectWikiPage.clickOnTrackers();
        trackerItemListPage = trackersPage.openTrackerFromLeftTree("Test Cases");
    }

    @Test
    public void checkTestCaseCreationErrorMessages() {
        DocumentViewPage documentViewPage = (DocumentViewPage) trackerItemListPage.clickOnViewMenuIcon(TrackerItemListPage.ViewMenuIcon.DOCUMENT_VIEW);
        documentViewPage.leftPane.clickOnPlusIcon();

    }
}
