1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.kew;
17
18 import edu.sampleu.admin.ConfigComponentActionListBkMrkAft;
19 import org.junit.Test;
20 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
21 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
22 import org.kuali.rice.testtools.selenium.WebDriverUtils;
23
24
25
26
27
28
29 public class QuickLinksAft extends WebDriverLegacyITBase {
30
31
32
33
34
35 public static final String BOOKMARK_URL =
36 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Quicklinks&channelUrl=" + WebDriverUtils
37 .getBaseUrlString() + "/kew/QuickLinks.do";
38
39 @Override
40 protected String getBookmarkUrl() {
41 return BOOKMARK_URL;
42 }
43
44 @Override
45 protected void navigate() throws InterruptedException {
46 waitAndClickMainMenu();
47 waitAndClickByLinkText("Quicklinks");
48 }
49
50 protected void testQuickLinks() throws Exception {
51 selectFrameIframePortlet();
52 assertTextPresent(new String[] {"Named Searches", "Quick EDoc Search", "Quick EDoc Watch", "Quick Action List"});
53
54 String rootWindow = driver.getWindowHandle();
55
56 ConfigComponentActionListBkMrkAft test = new ConfigComponentActionListBkMrkAft();
57 test.setTestMethodName("QuickLinksAft." + testMethodName);
58 test.setUpSetUp();
59 test.setDriver(getDriver());
60 open(getBaseUrlString() + test.getBookmarkUrl());
61 test.testActionListAcknowledgePerson_WithPendingApprove();
62 close();
63 driver.switchTo().window(rootWindow);
64 logout();
65
66 open(getBaseUrlString() + getBookmarkUrl());
67 selectFrameIframePortlet();
68 assertTextPresent(new String[] {"ENROUTE", "Route Log"});
69 }
70
71 @Test
72 public void testQuickLinksBookmark() throws Exception {
73 testQuickLinks();
74 passed();
75 }
76
77 @Test
78 public void testQuickLinksNav() throws Exception {
79 testQuickLinks();
80 passed();
81 }
82 }