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

public class ProjectBrowserTests extends BaseTest {

    @Test
    public void testProjectBrowser() {
        MyStartPage myStartPage = Helper.loginWithSystemAdmin();
        ProjectsPage projectsPage = myStartPage.clickOnProjects();
        String projectName = "test-project-sel-526861927-13016";
        projectsPage.changeProjectLarge(projectName);
        projectsPage.waitForSave();
        int largeWidth = projectsPage.getBoxSize(projectName).getWidth();
        projectsPage.changeProjectSmall(projectName);
        projectsPage.waitForSave();
        int smallWidth = projectsPage.getBoxSize(projectName).getWidth();
        Assert.assertTrue(smallWidth < largeWidth);
    }
}
