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.admin.workflow;
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 DocumentOperationAft extends WebDriverLegacyITBase {
027    
028        /**
029         *   AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Document%20Operation&channelUrl="+ WebDriverUtils
030         *   .getBaseUrlString()+"/kew/DocumentOperation.do";
031         */
032        public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Document%20Operation&channelUrl="+ WebDriverUtils
033                .getBaseUrlString()+"/kew/DocumentOperation.do";
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("Document Operation");
044        }
045    
046        protected void testDocumentOperation() throws Exception { 
047            selectFrameIframePortlet();
048            waitAndTypeByName("documentId","3010");
049            waitAndClickByName("methodToCall.getDocument");
050            waitForElementPresentByXpath("//input[@src='images/buttonsmall_save.gif']");
051            assertTextPresent("Document Actions");
052            assertTextPresent("Queue Document");
053            assertTextPresent("Queue Action Invocation");
054            assertTextPresent("Document ID:");
055            assertTextPresent("3010");
056            assertTextPresent("Route Node Instance ID:");
057            assertTextPresent("2923");
058        }
059    
060        @Test
061        public void testDocumentOperationBookmark() throws Exception {
062            testDocumentOperation();
063            passed();
064        }
065    
066        @Test
067        public void testDocumentOperationNav() throws Exception {
068            testDocumentOperation();
069            passed();
070        }
071    }