001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package edu.sampleu.kew;
017
018 import org.junit.Test;
019 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
020 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
021 import org.kuali.rice.testtools.selenium.WebDriverUtils;
022
023 /**
024 * Tests the Component section in Rice.
025 *
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 */
028 public class UserPreferenceAft extends WebDriverLegacyITBase {
029
030 /**
031 * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=User%20Preferences&channelUrl="
032 * + WebDriverUtils.getBaseUrlString() + "/kew/Preferences.do?returnLocation="
033 * + AutomatedFunctionalTestUtils.PORTAL;
034 */
035 public static final String BOOKMARK_URL =
036 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=User%20Preferences&channelUrl=" + WebDriverUtils
037 .getBaseUrlString() + "/kew/Preferences.do?returnLocation=" + AutomatedFunctionalTestUtils.PORTAL;
038
039 @Override
040 protected String getBookmarkUrl() {
041 return BOOKMARK_URL;
042 }
043
044 @Override
045 protected void navigate() throws InterruptedException {
046 waitAndClickMainMenu();
047 waitAndClickByLinkText("User Preferences");
048 }
049
050 protected void tesUserPreference() throws Exception {
051 selectFrameIframePortlet();
052 assertTextPresent("General");
053 assertTextPresent("Automatic Refresh Rate:");
054 assertElementPresentByXpath("//input[@name='preferences.refreshRate' and @value='15']");
055 assertElementPresentByXpath("//input[@name='preferences.pageSize' and @value='10']");
056 assertTextPresent("Fields Displayed In Action List");
057 assertTextPresent("Document Type");
058 assertElementPresentByXpath("//input[@name='preferences.showDocType' and @value='yes']");
059 assertTextPresent("Document Route Status Colors for Actionlist Entries");
060 assertTextPresent("Email Notification Preferences");
061 assertTextPresent("Receive Primary Delegate Emails");
062 assertElementPresentByXpath("//input[@name='preferences.notifyPrimaryDelegation' and @value='yes']");
063 }
064
065 @Test
066 public void testUserPreferenceBookmark() throws Exception {
067 tesUserPreference();
068 passed();
069 }
070
071 @Test
072 public void testUserPreferenceNav() throws Exception {
073 tesUserPreference();
074 passed();
075 }
076 }