001/**
002 * Copyright 2005-2016 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 */
016package edu.sampleu.admin.workflow;
017
018import org.junit.Test;
019import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
020import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
021import org.kuali.rice.testtools.selenium.WebDriverUtils;
022
023/**
024 * @author Kuali Rice Team (rice.collab@kuali.org)
025 */
026public class StatisticsAft extends WebDriverLegacyITBase {
027
028    /**
029     *  AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Statistics&channelUrl="+ WebDriverUtils
030     *   .getBaseUrlString()+"/kew/Stats.do?returnLocation=";
031     */
032    public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Statistics&channelUrl="+ WebDriverUtils
033            .getBaseUrlString()+"/kew/Stats.do?returnLocation=";
034 
035    @Override
036    protected String getBookmarkUrl() {
037        return BOOKMARK_URL;
038    }
039
040    @Override
041    protected void navigate() throws InterruptedException {
042        waitAndClickAdministration();
043        waitAndClickByLinkText("Statistics");
044    }
045
046    protected void testStatistics() throws Exception { 
047        selectFrameIframePortlet();
048        waitForElementPresentByXpath("//input[@src='images/buttonsmall_refresh.gif']");
049        assertTextPresent("Aggregates");
050        assertTextPresent("Number of Document Types:");
051        assertTextPresent("Number of Users:");
052        assertTextPresent("Number of Active Items In All Action Lists:");
053        assertTextPresent("Number of Documents Initiated in the Last 30 Days:");
054        assertTextPresent("Date Range");
055        assertTextPresent("Begin Date:");
056        assertTextPresent("End Date:");
057        assertTextPresent("Routing Status");
058        assertTextPresent("Number of Documents for Date Range");
059        assertTextPresent("CANCELED:");
060        assertTextPresent("DISAPPROVED:");
061        assertTextPresent("ENROUTE:");
062        assertTextPresent("EXCEPTION");
063        assertTextPresent("FINAL:");
064        assertTextPresent("INITIATED:");
065        assertTextPresent("PROCESSED:");
066        assertTextPresent("SAVED:");
067    }
068
069    @Test
070    public void testStatisticsBookmark() throws Exception {
071        testStatistics();
072        passed();
073    }
074
075    @Test
076    public void testStatisticsNav() throws Exception {
077        testStatistics();
078        passed();
079    }
080}