1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.demo.travel.account;
17
18 import edu.samplu.common.SmokeTestBase;
19 import org.junit.Test;
20
21
22
23
24 public class DemoTravelAccountMaintenanceNewSmokeTest extends SmokeTestBase {
25
26
27
28
29 public static final String FANCY_BOX_CLOSE_XPATH = "//div[@class='fancybox-item fancybox-close']";
30
31
32
33
34 public static final String FANCY_BOX_IFRAME_XPATH = "//iframe[@class='fancybox-iframe']";
35
36
37
38
39 public static final String BOOKMARK_URL = "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true";
40
41 @Override
42 public String getBookmarkUrl() {
43 return BOOKMARK_URL;
44 }
45
46 protected void navigate() throws Exception {
47 waitAndClickById("Demo-DemoLink", "");
48 waitAndClickByLinkText("Account Maintenance (New)");
49 }
50
51 protected void testTravelAccountMaintenanceNew() throws Exception {
52 waitAndTypeByName("document.documentHeader.documentDescription","Travel Account Maintenance New Test Document");
53 waitAndTypeByName("document.newMaintainableObject.dataObject.number","a1");
54 waitAndClickByXpath("//input[@alt='Direct Inquiry']");
55 waitAndClickByXpath(FANCY_BOX_CLOSE_XPATH);
56 assertTextPresent("Travel Account Maintenance");
57 }
58
59 @Test
60 public void testDemoTravelAccountMaintenanceNewBookmark() throws Exception {
61 testTravelAccountMaintenanceNew();
62 passed();
63 }
64
65 @Test
66 public void testDemoTravelAccountMaintenanceNewNav() throws Exception {
67 testTravelAccountMaintenanceNew();
68 passed();
69 }
70 }