1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.krad.demo.travel.account;
18
19 import org.junit.Test;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21
22
23
24
25 public class DemoTravelAccountMaintenanceAdHocRecipientsPersonAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&hideReturnLink=true";
31
32 @Override
33 public String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 protected void navigate() throws Exception {
38 waitAndClickById("Demo-DemoLink", "");
39 waitAndClickByLinkText("Travel Account Maintenance (New)");
40 }
41
42 protected void testTravelAccountMaintenanceAdHocRecipients() throws Exception {
43 waitAndTypeByName("document.documentHeader.documentDescription", "Travel Account Maintenance AdHoc Recipients Document");
44 waitAndTypeByName("document.newMaintainableObject.dataObject.number", "adhoc");
45 waitAndTypeByName("document.newMaintainableObject.dataObject.name", "adhoc");
46 waitAndClickByXpath("//input[@name='document.newMaintainableObject.dataObject.accountTypeCode' and @value='CAT']");
47
48 waitAndClickByLinkText("Ad Hoc Recipients");
49
50 waitAndTypeByName("newCollectionLines['document.adHocRoutePersons'].id", "kr");
51 waitAndClickById("Uif-AdHocPersonCollection_add");
52 jGrowl("Click Add button");
53 waitAndClickButtonByText("Save");
54
55 waitForTextPresent("Document was successfully saved.");
56
57 clearTextByName("document.adHocRoutePersons[0].id");
58 waitAndTypeByName("document.adHocRoutePersons[0].id", "1");
59 waitAndClickButtonByText("Save");
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 }