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 automation.ExplorerSuite;
import automation.SharedCodeClass;
import po.EDI_2pdiDisplayedPO;
import po.EDI_Prof_Quick_PO;



public class EDI_2pdiDisplayed extends ExplorerSuite {
private EDI_Prof_Quick_PO profQuickPO;

private String firstPdi = "201721491001384";
private String secondPdi = "201704191000043";

EDI_2pdiDisplayedPO twoPDIDisplayed;

public void localRunner() throws InterruptedException, Exception {
twoPDIDisplayed = new EDI_2pdiDisplayedPO(driver);
profQuickPO = new EDI_Prof_Quick_PO(driver);

SharedCodeClass.loadEWVPage(firstPdi);
twoPDIDisplayed.getWindowSplitted(secondPdi);

validatePDIs("Validate splitted in 2 claims screen"); //EWV_Story-01.11.06:As the Claim Processing team I would to be able to compare two different PDI claims, so that I can review PDI claim information
validatePdiLabels("Validate PDI labels"); //EWV_Story-01.11.03:As the Claim Processing team I would like a label added to distinguish between the Current PDI and Original PDI number information on EDI Web Viewer (EWV).
verifyHighLightingOnBillingInfo("Verify hightlighting");
}


public void validatePDIs(String result) throws InterruptedException, IOException{
try {
Assert.assertEquals("Left PDI is wrong", firstPdi, twoPDIDisplayed.getLeftPdi());
Assert.assertEquals("Right PDI is wrong", secondPdi, twoPDIDisplayed.getRightPdi());
SharedCodeClass.assertPassed(result);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(result, e);
e.printStackTrace();
}
}


public void validatePdiLabels(String description) throws IOException{
String label = "Original";

try {
Assert.assertEquals("Left PDI label is wrong", label, twoPDIDisplayed.getLabelLeft());
Assert.assertEquals("Right PDI label is wrong", label, twoPDIDisplayed.getLabelRight());
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e);
e.printStackTrace();
}
}

//Verify highlighting

public void verifyHighLightingOnBillingInfo(String description ) throws IOException{
try{
Assert.assertTrue(profQuickPO.isPOSHighlighted());
Assert.assertFalse(profQuickPO.isFreqHighlighted());
Assert.assertTrue(profQuickPO.isDXLinesHighlighted());
Assert.assertTrue(profQuickPO.isServiceLinesHighlighted());

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





}