1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.travelview;
17
18 import edu.samplu.common.KradMenuLegacyITBase;
19 import org.junit.Test;
20
21 import static org.junit.Assert.assertEquals;
22
23
24
25
26 public class MaintenanceConstraintTextLegacyIT extends KradMenuLegacyITBase {
27
28 @Override
29 protected String getLinkLocator() {
30 return "Travel Account Maintenance (New)";
31 }
32 @Test
33
34
35
36 public void testVerifyConstraintText() throws Exception {
37 gotoMenuLinkLocator();
38
39 assertEquals("* indicates required field", getText("div.uif-boxLayout.uif-horizontalBoxLayout.clearfix > span.uif-message.uif-requiredInstructionsMessage.uif-boxLayoutHorizontalItem"));
40
41 assertEquals("Must be 10 digits", getText("div.uif-group.uif-gridGroup.uif-gridSection.uif-disclosure.uif-boxLayoutVerticalItem.clearfix div[data-label='Travel Account Number'].uif-field.uif-inputField span.uif-message.uif-constraintMessage"));
42
43 assertEquals("Must be 10 digits", getText("div.uif-group.uif-gridGroup.uif-gridSection.uif-disclosure.uif-boxLayoutVerticalItem.clearfix div[data-label='Travel Sub Account Number'].uif-field.uif-inputField span.uif-message.uif-constraintMessage"));
44
45 assertEquals("Must be 10 digits", getText("div.uif-group.uif-gridGroup.uif-collectionItem.uif-gridCollectionItem.uif-collectionAddItem div[data-label='Travel Account Number'].uif-field.uif-inputField span.uif-message.uif-constraintMessage"));
46 passed();
47 }
48 }