package com.intland.codebeamer.functionaltest.test;

import com.codeborne.selenide.Condition;
import com.intland.codebeamer.functionaltest.helper.Helper;
import com.intland.codebeamer.functionaltest.page.DocumentsPage;
import com.intland.codebeamer.functionaltest.page.mystart.MyStartPage;
import com.intland.codebeamer.functionaltest.page.wiki.ProjectWikiPage;
import com.intland.codebeamer.functionaltest.page.projects.ProjectsPage;
import org.testng.annotations.Test;

public class DocumentTests extends BaseTest {
    @Test
    public void testDocumentsRootTree() {
        MyStartPage myStartPage = Helper.loginWithSystemAdmin();
        ProjectsPage projectsPage = myStartPage.clickOnProjects();
        projectsPage.clickOnCompactList();
        ProjectWikiPage projectWikiPage = projectsPage.clickOnProject(projectName);
        DocumentsPage documentsPage = projectWikiPage.clickOnDocuments();
        documentsPage.clickOnFolder(".codeBeamer");
        documentsPage.clickOnDocumentRoot();
        documentsPage.getDocumentTable().shouldBe(Condition.visible);
    }
}
