001/** 002 * Copyright 2005-2016 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.notification; 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 * Created by sona on 10/14/14. 025 */ 026public class AgendaEditorPropositionLabelAft extends WebDriverLegacyITBase{ 027 public static final String BOOKMARK_URL = 028 AutomatedFunctionalTestUtils.PORTAL 029 + "?channelTitle=Agenda%20Lookup&channelUrl=" 030 + WebDriverUtils.getBaseUrlString() 031 + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD 032 + "org.kuali.rice.krms.impl.repository.AgendaBo" 033 + AutomatedFunctionalTestUtils.SHOW_MAINTENANCE_LINKS 034 + "&returnLocation=" 035 + AutomatedFunctionalTestUtils.PORTAL_URL 036 + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; 037 038 @Override 039 protected String getBookmarkUrl() { 040 return BOOKMARK_URL; 041 } 042 043 @Override 044 protected void navigate() throws Exception { 045 waitAndClickByLinkText(AGENDA_LOOKUP_LINK_TEXT); 046 waitForPageToLoad(); 047 } 048 049 protected void testAgendaEditorPropositionLabel() throws Exception { 050 selectFrameIframePortlet(); 051 waitAndTypeByName("lookupCriteria[name]","My Fabulous Agenda"); 052 waitAndClickByXpath("//button[contains(text(),'Search')]"); 053 waitAndClickByXpath("//a[contains(text(),'edit')]"); 054 selectFrameIframePortlet(); 055 waitAndClickByXpath("//a/div[contains(text(),'Rule1: stub rule lorem ipsum')]"); 056 waitAndClickByXpath("//button[contains(text(),'Edit Rule')]"); 057 selectFrameIframePortlet(); 058 waitForTextPresent("Campus Code = BL"); 059 selectByName("document.newMaintainableObject.dataObject.agendaItemLine.rule.propositionTree.rootElement.children[0].data.proposition.id","T1000"); 060 waitAndClickButtonByExactText("Edit") ; 061 assertLabelWithTextPresent("Description"); 062 assertLabelWithTextPresent("Category"); 063 assertLabelWithTextPresent("Term"); 064 assertLabelWithTextPresent("Comparison"); 065 assertLabelWithTextPresent("Value"); 066 passed(); 067 } 068 069 070 @Test 071 public void testAgendaEditorPropositionLabelNav() throws Exception { 072 testAgendaEditorPropositionLabel(); 073 } 074 075}