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