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 */ 016package edu.sampleu.main; 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 * Checks editing propositions. 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 */ 028public class AgendaEditorEditPropositionAft extends WebDriverLegacyITBase { 029 030 public static final String BOOKMARK_URL = 031 AutomatedFunctionalTestUtils.PORTAL 032 + "?channelTitle=Agenda%20Lookup&channelUrl=" 033 + WebDriverUtils.getBaseUrlString() 034 + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD 035 + "org.kuali.rice.krms.impl.repository.AgendaBo" 036 + AutomatedFunctionalTestUtils.SHOW_MAINTENANCE_LINKS 037 + "&returnLocation=" 038 + AutomatedFunctionalTestUtils.PORTAL_URL 039 + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; 040 041 @Override 042 protected String getBookmarkUrl() { 043 return BOOKMARK_URL; 044 } 045 046 @Override 047 protected void navigate() throws Exception { 048 waitAndClickByLinkText(AGENDA_LOOKUP_LINK_TEXT); 049 waitForPageToLoad(); 050 } 051 052 /** 053 * Test that we can submit an already existing agenda with a proposition with no errors. 054 * 055 * @throws Exception for any test problems 056 */ 057 protected void testNoEditSubmit() throws Exception { 058 selectFrameIframePortlet(); 059 060 // search for and edit specific record 061 waitAndTypeByName("lookupCriteria[id]", "T1001"); 062 waitAndClickButtonByExactText("Search"); 063 waitAndClickByLinkText("edit"); 064 065 // make sure we can submit, reload, and that we are then in final status 066 submitSuccessfully(); 067 waitAndClickButtonByText("Reload"); 068 waitForTextPresent("FINAL"); 069 } 070 071 @Test 072 public void testAgendaEditorEditPropositionNav() throws Exception { 073 testNoEditSubmit(); 074 passed(); 075 } 076 077}