1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.travel.account;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20
21
22
23
24 public class DemoTravelAccountMaintenanceAdHocRecipientsPersonAft extends WebDriverLegacyITBase {
25
26
27
28
29 public static final String BOOKMARK_URL = "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&hideReturnLink=true";
30
31 @Override
32 public String getBookmarkUrl() {
33 return BOOKMARK_URL;
34 }
35
36 protected void navigate() throws Exception {
37 waitAndClickDemoLink();
38 waitAndClickByLinkText("Travel Account Maintenance (New)");
39 }
40
41 protected void testTravelAccountMaintenanceAdHocRecipients() throws Exception {
42 waitAndTypeByName("document.documentHeader.documentDescription", "Travel Account Maintenance AdHoc Recipients Document");
43 waitAndTypeByName("document.newMaintainableObject.dataObject.number", "adhoc");
44 waitAndTypeByName("document.newMaintainableObject.dataObject.name", "adhoc");
45 waitAndClickByXpath("//input[@name='document.newMaintainableObject.dataObject.accountTypeCode' and @value='CAT']");
46
47 waitAndClickByLinkText("Ad Hoc Recipients");
48
49 waitAndTypeByName("newCollectionLines['document.adHocRoutePersons'].id", "kr");
50 jGrowl("Click Add button");
51 waitAndClickById("Uif-AdHocPersonCollection_add");
52 waitForElementPresentByXpath("//div[@data-parent=\"Uif-AdHocPersonCollection\"]/div/span[contains(text(), 'KR']"); // kr added and now displayed on the page
53
54 saveSuccessfully();
55
56 clearTextByName("document.adHocRoutePersons[0].id");
57 waitAndTypeByName("document.adHocRoutePersons[0].id", "1");
58 waitAndClickSaveByText();
59 waitForProgressSaving();
60
61 waitForTextPresent("Invalid Ad Hoc Routing Person Network Id");
62 }
63
64 @Test
65 public void testDemoTravelAccountMaintenanceAdHocRecipientsBookmark() throws Exception {
66 testTravelAccountMaintenanceAdHocRecipients();
67 passed();
68 }
69
70 @Test
71 public void testDemoTravelAccountMaintenanceAdHocRecipientsNav() throws Exception {
72 testTravelAccountMaintenanceAdHocRecipients();
73 passed();
74 }
75
76 }