1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.library.navigation;
17
18 import org.junit.Test;
19
20 import org.kuali.rice.testtools.selenium.Failable;
21 import org.kuali.rice.testtools.selenium.ITUtil;
22 import org.kuali.rice.testtools.selenium.SmokeTestBase;
23 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
24
25
26
27
28 public class DemoLibraryNavigationGroupSmokeTest extends SmokeTestBase {
29
30
31
32
33 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-NavigationGroup-View&methodToCall=start";
34
35 @Override
36 protected String getBookmarkUrl() {
37 return BOOKMARK_URL;
38 }
39
40 @Override
41 protected void navigate() throws Exception {
42 waitAndClickById("Demo-LibraryLink", "");
43 waitAndClickByLinkText("Navigation");
44 waitAndClickByLinkText("Navigation Group");
45 }
46
47 protected void testNavigationView() throws Exception {
48 waitAndClickByLinkText("Navigation Group Tab Example");
49 switchToWindow("Kuali :: Navigation View");
50 waitForElementPresentByXpath("//div[@id='Uif-Navigation']/ul/li");
51 assertElementPresentByXpath("//div[@id='Uif-Navigation']/ul/li[3]");
52 switchToWindow("Kuali");
53 }
54
55 protected void testNavigationMenuView() throws Exception {
56 selectByName("exampleShown","Navigation Group Menu");
57 waitAndClickByLinkText("Navigation Group Menu Example");
58 switchToWindow("Kuali :: Navigation Menu View");
59 waitForElementPresentByXpath("//div[@class='uif-navigationMenu-wrapper']");
60 waitAndClickByLinkText("<<");
61 waitForElementPresentByXpath("//div[@class='uif-navigationMenu-wrapper' and @style='display: none;']");
62 switchToWindow("Kuali");
63 }
64
65 @Test
66 public void testGeneralFeaturesUnifiedViewHeaderBookmark() throws Exception {
67 testNavigationView();
68 testNavigationMenuView();
69 passed();
70 }
71
72 @Test
73 public void testGeneralFeaturesUnifiedViewHeaderNav() throws Exception {
74 testNavigationView();
75 testNavigationMenuView();
76 passed();
77 }
78 }