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.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
19 import org.apache.commons.lang.RandomStringUtils;
20 import org.junit.Test;
21
22
23
24
25 public class DemoTravelAccountMaintenanceNewExpandCollapseAft 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 waitAndClickDemoLink();
39 waitAndClickByLinkText("Travel Account Maintenance (New)");
40 }
41
42 protected void testTravelAccountMaintenanceNewExpandCollapse() throws Exception {
43 waitAndClickByXpath("//a/span[contains(text(),'Document Overview')]");
44 waitAndClickByXpath("//a/span[contains(text(),'Account Information')]");
45 waitAndClickByXpath("//a/span[contains(text(),'Sub Accounts')]");
46 waitAndClickButtonByExactText("Submit");
47 waitForElementPresentByXpath("//div[@style='overflow: hidden; display: block;']/div/ul/li/a[contains(text(),'Description: Required')]");
48 waitForElementPresentByXpath("//div[@style='overflow: hidden; display: block;']/div/ul/li/a[contains(text(),'Travel Account Number: Required')]");
49 waitForElementPresentByXpath("//div[@style='overflow: hidden; display: block;']/div/ul/li/a[contains(text(),'Travel Account Name: Required')]");
50 waitForElementPresentByXpath("//div[@style='overflow: hidden; display: block;']/div/ul/li/a[contains(text(),'Travel Account Type Code: Required')]");
51 }
52
53 protected void testTravelAccountMaintenanceNewExpandCollapse1() throws Exception {
54 waitAndTypeByName("document.documentHeader.documentDescription","Travel Account Maintenance New Test Document");
55 String randomCode = RandomStringUtils.randomAlphabetic(9).toUpperCase();
56 waitAndTypeByName("document.newMaintainableObject.dataObject.number",randomCode);
57 waitAndTypeByName("document.newMaintainableObject.dataObject.name",randomCode);
58 waitAndClickByName("document.newMaintainableObject.dataObject.accountTypeCode");
59 waitForElementPresentByXpath("//section[@class='uif-disclosure tableborders wrap uif-boxLayoutVerticalItem clearfix']/div[@style='display: none; overflow: hidden;']");
60 waitAndClickByXpath("//section[@class='uif-disclosure tableborders wrap uif-boxLayoutVerticalItem clearfix']/header/h3/a");
61 waitForElementPresentByXpath("//section[@class='uif-disclosure tableborders wrap uif-boxLayoutVerticalItem clearfix']/div[@style='display: block; overflow: hidden;']");
62 waitAndClickButtonByExactText("Submit");
63 waitAndClickConfirmSubmitOk();
64 waitForElementPresentByXpath("//section[@class='uif-disclosure tableborders wrap uif-boxLayoutVerticalItem clearfix']/header/h3/a[@data-open='true']");
65 }
66
67 @Test
68 public void testDemoTravelAccountMaintenanceNewExpandCollapseBookmark() throws Exception {
69 testTravelAccountMaintenanceNewExpandCollapse();
70 passed();
71 }
72
73 @Test
74 public void testDemoTravelAccountMaintenanceNewExpandCollapseNav() throws Exception {
75 testTravelAccountMaintenanceNewExpandCollapse();
76 passed();
77 }
78
79 @Test
80 public void testDemoTravelAccountMaintenanceNewExpandCollapse1Bookmark() throws Exception {
81 testTravelAccountMaintenanceNewExpandCollapse1();
82 passed();
83 }
84
85 @Test
86 public void testDemoTravelAccountMaintenanceNewExpandCollapse1Nav() throws Exception {
87 testTravelAccountMaintenanceNewExpandCollapse1();
88 passed();
89 }
90 }