Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package automation.Pages;

import java.io.IOException;

import org.junit.Assert;
import org.junit.Test;

import automation.ExplorerSuite;
import automation.SharedCodeClass;
import po.CommonPO;
import po.HomePO;



/***
*
* @author EKutsenko,
* @version 1.0
*/

public class HomePage {

HomePO homePage = new HomePO();
CommonPO commonPage= new CommonPO();

String description1 = "Session Work Queue layout";
String description2 = "There is a menu navigation bar on the home page ";
String description3 = "Stations can be selected from the home page";
String description4 = "Sidebar Navigation";
String description5 = "Selected active stations are displayed in Active Station menu";



// Session Work Queue
@Test
public void SessionWorkQueueLayout() throws IOException {

try {
commonPage.clickFeePaymentNav();
Assert.assertTrue(homePage.isHeaderDisplayed());
Assert.assertTrue(homePage.isInputFilterDisplayed());
Assert.assertTrue(homePage.isTableSessWorkQDisplayed());
Assert.assertTrue(homePage.isButtonDisplayed());
SharedCodeClass.assertPassed(description1);

} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description1, e);
}
}


@Test
public void isNavigationMenuBarDisplayed() throws IOException {
try {
commonPage.clickFeePaymentNav();
Assert.assertTrue(homePage.isNavMenuDisp());
SharedCodeClass.assertPassed(description2);

} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description2, e);
}
}


@Test
public void isSelectAllCheckboxFunctional() throws IOException{
try {
commonPage.clickFeePaymentNav();
homePage.clickSelectAllCheckBoxes();
Assert.assertTrue(homePage.areAllCheckBoxesSelected());
SharedCodeClass.assertPassed(description3);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description3, e);

}
}

@Test
/**Sidebar navigation*******************************/
public void sidebarNavigationTest() throws IOException{
String expectedFppTitle = "Fee Payment Processing";
String expectedEwvTitle = "EDI Web Viewer";
String expectedAttRetrTitle ="Attachments Retrieval | 275 Search";

try {
commonPage.clickFeePaymentNav();
Assert.assertEquals(expectedFppTitle,commonPage.getFppTitle());
commonPage.clickEdiWebViwerNav();
Assert.assertEquals(expectedEwvTitle,commonPage.getEwvTitle());
commonPage.clickAttachRetrievalNav();
Assert.assertEquals(expectedAttRetrTitle,commonPage.getAttRetrTitle());
commonPage.clickFeePaymentNav();
SharedCodeClass.assertPassed(description4);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description4, e);
}
}

/***Verify list of active Stations
* @throws IOException ***********************************************/
@Test
public void listOfActiveStationsTest() throws IOException{
try {
commonPage.clickFeePaymentNav();
commonPage.navActiveStationsClick();
homePage.clickSelectAllCheckBoxes();
homePage.btnSetActiveClick();
Assert.assertEquals(homePage.getListOfStations(), commonPage.getActiveStationsList());

homePage.clickUnSelectAllCheckBoxes();
homePage.btnSetActiveClick();
Assert.assertEquals("[No Active Stations]", commonPage.getActiveStationsList().toString());

SharedCodeClass.assertPassed(description5);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description5, e);
}

}

//Test sandwich collaps menu
@Test
public void sandwichCollapsTest(){
System.out.println("SideBar width: " + commonPage.getWidhtOfSideBar());
commonPage.clickSandwich();
System.out.println("SideBar width: " + commonPage.getWidhtOfSideBar());





}
}