1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.library.navigation;
17
18 import org.junit.Test;
19
20
21
22
23 public class LibraryApplicationHeaderAft extends LibraryNavigationBase {
24
25
26
27
28 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-AppHeaderView";
29
30 @Override
31 public String getBookmarkUrl() {
32 return BOOKMARK_URL;
33 }
34
35 @Override
36 protected void navigate() throws Exception {
37 waitAndClickLibraryLink();
38 waitAndClickByLinkText("Navigation");
39 waitAndClickByLinkText("Application Header");
40 }
41
42 protected void testApplicationHeaderFluid() throws Exception {
43 waitAndClickByLinkText("Fluid");
44 waitAndClickByLinkText("Fluid Application Header");
45 switchToWindow("Kuali :: Default Application Header");
46 waitForElementPresentByXpath("//h1/span");
47 assertElementPresentByXpath("//header[@class='container-fluid uif-viewHeader uif-header' and @data-header_for='Demo-AppHeader-View1']");
48 waitForTextPresent("Fluid Application Header");
49 selectParentWindow();
50 }
51
52 protected void testApplicationHeaderFixed() throws Exception {
53 waitAndClickByLinkText("Fixed");
54 waitAndClickByLinkText("Fixed Application Header");
55 switchToWindow("Kuali :: Default Application Header");
56 waitForElementPresentByXpath("//h1/span");
57 assertElementPresentByXpath("//header[@class='container uif-viewHeader uif-header' and @data-header_for='Demo-AppHeader-View2']");
58 waitForTextPresent("Fixed Application Header");
59 selectParentWindow();
60 }
61
62 @Test
63 public void testApplicationHeaderBookmark() throws Exception {
64 testApplicationHeaderFluid();
65 testApplicationHeaderFixed();
66 passed();
67 }
68
69 @Test
70 public void testApplicationHeaderNav() throws Exception {
71 testApplicationHeaderFluid();
72 testApplicationHeaderFixed();
73 passed();
74 }
75 }