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.ReleasePage;
import org.testng.annotations.Test;

import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Selenide.open;

public class ReleaseTests extends BaseTest {

    @Test
    public void testReleaseStats() {
        MyStartPage myStartPage = Helper.loginWithSystemAdmin();
        ReleasePage releasePage = open("/tracker/1075", ReleasePage.class);
        releasePage.clickOnRelease("NotEmpty Release");
        releasePage.expandRelease();
        releasePage.filterBy("High");
        releasePage.getIssueList().shouldHave(text("Test Task 1"));
        releasePage.getIssueList().shouldNotHave(text("Test Bug 1"));
        releasePage.getIssueList().shouldNotHave(text("Test Bug 2"));
        releasePage.getIssueList().shouldNotHave(text("Test Task 3"));
    }
}
