1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package edu.sampleu.kew;
17  
18  import org.junit.Test;
19  import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20  import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21  import org.kuali.rice.testtools.selenium.WebDriverUtils;
22  
23  
24  
25  
26  
27  
28  public class UserPreferenceAft extends WebDriverLegacyITBase {
29  
30      
31  
32  
33  
34  
35      public static final String BOOKMARK_URL =
36              AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=User%20Preferences&channelUrl=" + WebDriverUtils
37                      .getBaseUrlString() + "/kew/Preferences.do?returnLocation=" + AutomatedFunctionalTestUtils.PORTAL;
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("User Preferences");
48      }
49  
50      protected void tesUserPreference() throws Exception {
51          selectFrameIframePortlet();
52          assertTextPresent("General");
53          assertTextPresent("Automatic Refresh Rate:");
54          assertElementPresentByXpath("//input[@name='preferences.refreshRate' and @value='15']");
55          assertElementPresentByXpath("//input[@name='preferences.pageSize' and @value='10']");
56          assertTextPresent("Fields Displayed In Action List");
57          assertTextPresent("Document Type");
58          assertElementPresentByXpath("//input[@name='preferences.showDocType' and @value='yes']");
59          assertTextPresent("Document Route Status Colors for Actionlist Entries");
60          assertTextPresent("Email Notification Preferences");
61          assertTextPresent("Receive Primary Delegate Emails");
62          assertElementPresentByXpath("//input[@name='preferences.notifyPrimaryDelegation' and @value='yes']");
63      }
64  
65      @Test
66      public void testUserPreferenceBookmark() throws Exception {
67          tesUserPreference();
68          passed();
69      }
70  
71      @Test
72      public void testUserPreferenceNav() throws Exception {
73          tesUserPreference();
74          passed();
75      }
76  }