1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.krad.screenelement;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23
24
25
26 public class RowDetailsAft extends WebDriverLegacyITBase {
27
28
29
30
31 public static final String BOOKMARK_URL ="/kr-krad/uicomponents?viewId=Demo-RowDetails&methodToCall=start";
32
33 @Override
34 protected String getBookmarkUrl() {
35 return BOOKMARK_URL;
36 }
37
38 @Override
39 protected void navigate() throws InterruptedException {
40 waitAndClickKRAD();
41 waitAndClickByLinkText("Row Details Demo");
42 switchToWindow("Kuali :: Row Details Demo");
43 }
44
45 private void testRowDetails() throws Exception{
46 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section6_detLink_line0']");
47 waitForElementPresentByXpath("//input[@name='field4']");
48 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section1_detLink_line0']");
49 waitForElementPresentByXpath("//input[@name='list2[0].field4']");
50 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section2_detLink_line0']");
51 waitForElementPresentByXpath("//tr/td/div/div[@data-label='Field 3']");
52 jGrowl("Expand TableCollection inside the details itself SubCollection");
53 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section3_detLink_line0']");
54 waitForTextPresent("SubField 2");
55 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section4_detLink_line0']");
56 waitForTextPresent("SubCollection Title");
57 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section5_detLink_line0']");
58 waitForTextPresent("SubCollection");
59 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section7_detLink_line0']");
60 waitForElementPresentByXpath("//table[@class='uif-lightTable']");
61 }
62
63 @Test
64 public void testRowDetailsBookmark() throws Exception {
65 testRowDetails();
66 passed();
67 }
68
69 @Test
70 public void testRowDetailsNav() throws Exception {
71 testRowDetails();
72 passed();
73 }
74
75 }