1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.library.general;
17
18 import org.junit.Test;
19
20 import org.kuali.rice.testtools.selenium.SmokeTestBase;
21
22
23
24
25 public class DemoLibraryGeneralFeaturesStickyFooterSmokeTest extends SmokeTestBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-StickyFooter-View&methodToCall=start";
31
32 @Override
33 protected String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 @Override
38 protected void navigate() throws Exception {
39 waitAndClickById("Demo-LibraryLink", "");
40 waitAndClickByLinkText("General Features");
41 waitAndClickByLinkText("Sticky Footer Options");
42 }
43
44 protected void testGeneralFeaturesExample1() throws Exception {
45 waitAndClickByLinkText("Sticky Application Footer");
46 waitAndClickByLinkText("Sticky application footer");
47 switchToWindow("Kuali :: View Header");
48 assertElementPresentByXpath("//div[@id='Uif-ApplicationFooter-Wrapper' and @data-sticky_footer='true']");
49 switchToWindow("Kuali");
50 }
51
52 protected void testGeneralFeaturesExample2() throws Exception {
53 waitAndClickByLinkText("Sticky Page Footer");
54 waitAndClickByLinkText("Sticky page footer");
55 switchToWindow("Kuali :: View Header");
56 assertElementPresentByXpath("//div[@class='uif-horizontalBoxGroup uif-stickyFooter uif-stickyButtonFooter' and @data-sticky_footer='true']");
57 switchToWindow("Kuali");
58 }
59
60 protected void testGeneralFeaturesExample3() throws Exception {
61 waitAndClickByLinkText("Sticky View Footer");
62 waitAndClickByLinkText("Sticky view footer");
63 switchToWindow("Kuali :: View Header");
64 assertElementPresentByXpath("//div[@class='uif-horizontalBoxGroup uif-stickyFooter uif-stickyButtonFooter' and @data-sticky_footer='true']");
65 switchToWindow("Kuali");
66 }
67
68 protected void testGeneralFeaturesExample4() throws Exception {
69 waitAndClickByLinkText("Sticky View Footer and Page Footer");
70 waitAndClickByLinkText("Sticky page and view footer");
71 switchToWindow("Kuali :: View Header");
72 assertElementPresentByXpath("//div[@class='uif-horizontalBoxGroup uif-stickyFooter uif-stickyButtonFooter' and @data-sticky_footer='true']");
73 switchToWindow("Kuali");
74 }
75
76 protected void testGeneralFeaturesExample5() throws Exception {
77 waitAndClickByLinkText("Sticky Everything");
78 waitAndClickByLinkText("All footer content sticky");
79 switchToWindow("Kuali :: View Header");
80 assertElementPresentByXpath("//div[@class='uif-horizontalBoxGroup uif-stickyFooter uif-stickyButtonFooter' and @data-sticky_footer='true']");
81 assertElementPresentByXpath("//div[@id='Uif-ApplicationFooter-Wrapper' and @data-sticky_footer='true']");
82 switchToWindow("Kuali");
83 }
84
85 @Test
86 public void testGeneralFeaturesUnifiedViewHeaderBookmark() throws Exception {
87 testGeneralFeaturesExample5();
88 testGeneralFeaturesExample4();
89 testGeneralFeaturesExample3();
90 testGeneralFeaturesExample2();
91 testGeneralFeaturesExample1();
92 passed();
93 }
94
95 @Test
96 public void testGeneralFeaturesUnifiedViewHeaderNav() throws Exception {
97 testGeneralFeaturesExample5();
98 testGeneralFeaturesExample4();
99 testGeneralFeaturesExample3();
100 testGeneralFeaturesExample2();
101 testGeneralFeaturesExample1();
102 passed();
103 }
104 }