001/** 002 * Copyright 2005-2015 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; 017 018import org.kuali.rice.testtools.common.JiraAwareFailable; 019import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils; 020import org.kuali.rice.testtools.selenium.WebDriverUtils; 021 022import java.util.List; 023 024/** 025 * @author Kuali Rice Team (rice.collab@kuali.org) 026 */ 027public abstract class ParameterAftBase extends AdminTmplMthdAftNavBase { 028 029 /** 030 * ITUtil.PORTAL + "?channelTitle=Parameter&channelUrl=" 031 * + WebDriverUtils.getBaseUrlString() + ITUtil.KNS_LOOKUP_METHOD + "org.kuali.rice.coreservice.impl.parameter.ParameterBo&docFormKey=88888888&returnLocation=" + 032 * ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK; 033 */ 034 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Parameter&channelUrl=" 035 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KNS_LOOKUP_METHOD + 036 "org.kuali.rice.coreservice.impl.parameter.ParameterBo&docFormKey=88888888&returnLocation=" + 037 AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK ; 038 039 private String docId; 040 private String parameterName; 041 042 @Override 043 protected String getBookmarkUrl() { 044 return BOOKMARK_URL; 045 } 046 047 /** 048 * {@inheritDoc} 049 * Parameter 050 * @return 051 */ 052 @Override 053 protected String getLinkLocator() { 054 return "Parameter"; 055 } 056 057 public void testParameterBookmark(JiraAwareFailable failable) throws Exception { 058 // Create New 059 selectFrame("iframeportlet"); 060 waitAndCreateNew(); 061 List<String> params; 062 params=testCreateNewParameter(docId, parameterName); 063 064 //Lookup 065 open(WebDriverUtils.getBaseUrlString()+BOOKMARK_URL); 066 selectFrame("iframeportlet"); 067 params=testLookUpParameter(params.get(0), params.get(1)); 068 069 //edit 070 params=testEditParameter(params.get(0), params.get(1)); 071 072 //Verify if its edited 073 open(WebDriverUtils.getBaseUrlString()+BOOKMARK_URL); 074 selectFrame("iframeportlet"); 075 params=testVerifyModifiedParameter(params.get(0), params.get(1)); 076 077 //copy 078 params=testCopyParameter(params.get(0), params.get(1)); 079 080 //Verify if its copied 081 open(WebDriverUtils.getBaseUrlString()+BOOKMARK_URL); 082 selectFrame("iframeportlet"); 083 testVerifyModifiedParameter(params.get(0), params.get(1)); 084 passed(); 085 } 086 087 public void testParameterNav(JiraAwareFailable failable) throws Exception { 088 //Create New 089 gotoCreateNew(); 090 List<String> params; 091 params=testCreateNewParameter(docId, parameterName); 092 093 //Lookup 094 navigate(); 095 selectFrame("iframeportlet"); 096 params=testLookUpParameter(params.get(0), params.get(1)); 097 098 //edit 099 params=testEditParameter(params.get(0), params.get(1)); 100 101 //Verify if its edited 102 navigate(); 103 params=testVerifyModifiedParameter(params.get(0), params.get(1)); 104 105 //copy 106 params=testCopyParameter(params.get(0), params.get(1)); 107 108 //Verify if its copied 109 navigate(); 110 testVerifyModifiedParameter(params.get(0), params.get(1)); 111 passed(); 112 } 113}