1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.demo.uif.library;
17
18 import com.thoughtworks.selenium.SeleneseTestBase;
19 import edu.samplu.common.Failable;
20 import org.junit.Test;
21
22
23
24
25 public class DemoLibraryNavigationSmokeTest extends DemoLibraryNavigationBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-NavigationGroup-View";
31
32 @Override
33 public String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 @Override
38 protected void navigate() throws Exception {
39 navigateToExample("Demo-NavigationGroup-Example1");
40 }
41
42 protected void testNavigationTabs() throws Exception {
43 waitAndClickByLinkText("Navigation Group Tab Example");
44 try {
45 selectWindow(driver.getWindowHandles().toArray()[1].toString());
46 } catch (Throwable t) {
47 fail("Expected another window to be opened " + t.getCause());
48 }
49 waitForElementPresentByClassName("uif-headerText-span");
50 SeleneseTestBase.assertTrue(driver.getTitle().contains("Kuali :: Navigation View"));
51 assertTextPresent("Navigation View");
52 }
53
54 public void testNavigationMenuBookmark(Failable failable) throws Exception {
55 testNavigationTabs();
56 testNavigationView();
57 passed();
58 }
59
60 public void testNavigationMenuNav(Failable failable) throws Exception {
61 navigateToLibraryDemo("Navigation", "Navigation Group");
62 testNavigationTabs();
63 testNavigationView();
64 passed();
65 }
66
67 @Test
68 public void testNavigationMenuBookmark() throws Exception {
69 testNavigationMenuBookmark(this);
70 }
71
72 @Test
73 public void testNavigationMenuNav() throws Exception {
74 testNavigationMenuNav(this);
75 }
76 }