001    /**
002     * Copyright 2005-2014 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.main.notification;
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     * @author Kuali Rice Team (rice.collab@kuali.org)
025     */
026    public class NotificationSearchAft extends WebDriverLegacyITBase {
027    
028        /**
029         * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Notification%20Search&channelUrl=" + WebDriverUtils
030         * .getBaseUrlString() + "/kew/DocumentSearch.do?documentTypeName=KualiNotification&returnLocation=" +
031         * AutomatedFunctionalTestUtils.PORTAL +"&hideReturnLink=true";
032         */
033        public static final String BOOKMARK_URL =
034                AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Notification%20Search&channelUrl=" + WebDriverUtils
035                        .getBaseUrlString() + "/kew/DocumentSearch.do?documentTypeName=KualiNotification&returnLocation=" +
036                        AutomatedFunctionalTestUtils.PORTAL +"&hideReturnLink=true";
037        
038        /*
039         * //input[@title='search']
040         */
041        private static final String SEARCH_BUTTON_XPATH="//input[@title='search']";
042    
043        @Override
044        protected String getBookmarkUrl() {
045            return BOOKMARK_URL;
046        }
047    
048        @Override
049        protected void navigate() throws InterruptedException {
050            waitAndClickByLinkText("Notification Search");
051        }
052        
053        private void testNotificationSearch() throws Exception{
054            selectFrameIframePortlet();
055            waitAndClickByXpath(SEARCH_BUTTON_XPATH);
056            checkForIncidentReport();
057            // No results
058        }
059        
060        @Test
061        public void testNotificationSearchBookmark() throws Exception {
062            testNotificationSearch();
063            passed();
064        }
065    
066        @Test
067        public void testNotificationSearchNav() throws Exception {
068            testNotificationSearch();
069            passed();
070        }
071        
072    }