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.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 RoutingIdentityManagementDocumentTypeHierarchyAft extends WebDriverLegacyITBase {
029    
030        /**
031         * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Report&channelUrl="
032         * + WebDriverUtils.getBaseUrlString() + "/kew/RoutingReport.do?returnLocation=" +
033         * AutomatedFunctionalTestUtils.PORTAL;
034         */
035        public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL
036                + "?channelTitle=Routing%20and%20Identity%20Management%20Document%20Type%20Hierarchy&channelUrl="
037                + WebDriverUtils.getBaseUrlString()
038                + "/kew/RuleQuickLinks.do";
039    
040        @Override
041        protected String getBookmarkUrl() {
042            return BOOKMARK_URL;
043        }
044    
045        @Override
046        protected void navigate() throws InterruptedException {
047            waitAndClickMainMenu();
048            waitAndClickByLinkText("Routing and Identity Management Document Type Hierarchy");
049        }
050    
051        protected void testRoutingIdentityManagementDocumentTypeHierarchy() throws Exception {
052            selectFrameIframePortlet();
053            waitAndClickByXpath("//input[@id='tab-SendNotificationRequest-imageToggle']");
054            assertTextPresent("RequestsNode");
055            assertTextPresent("ReviewersNode");
056            waitAndClickByXpath("//input[@id='tab-eDocExample1ParentDocument-imageToggle']");
057            assertTextPresent("eDoc.Example1.Node1");
058            waitAndClickByXpath("//input[@id='tab-KualiDocument-imageToggle']");
059            assertTextPresent("Rice Document (RiceDocument)");
060            assertTextPresent("Edit Document Type");
061            assertTextPresent("View Document Configuration");
062            assertTextPresent("Agenda Maintenance Document (AgendaMaintenanceDocument)");
063        }
064    
065        @Test
066        public void testRoutingIdentityManagementDocumentTypeHierarchyBookmark() throws Exception {
067            testRoutingIdentityManagementDocumentTypeHierarchy();
068            passed();
069        }
070    
071        @Test
072        public void testRoutingIdentityManagementDocumentTypeHierarchyNav() throws Exception {
073            testRoutingIdentityManagementDocumentTypeHierarchy();
074            passed();
075        }
076    }