001 /* 002 * Copyright 2011 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/ecl1.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 017 package edu.samplu.mainmenu.test; 018 019 import org.junit.Test; 020 import org.openqa.selenium.By; 021 022 import edu.samplu.common.ITUtil; 023 import edu.samplu.common.WebDriverLegacyITBase; 024 025 026 /** 027 * tests whether the Attribute Definition Look UP is working ok 028 * 029 * @author Kuali Rice Team (rice.collab@kuali.org) 030 */ 031 public class AttributeDefinitionLookUpLegacyIT extends WebDriverLegacyITBase{ 032 @Override 033 public String getTestUrl() { 034 return ITUtil.PORTAL; 035 } 036 037 @Test 038 public void testAttributeDefinitionLookUp() throws Exception { 039 waitAndClickByLinkText("Attribute Definition Lookup"); 040 waitForPageToLoad(); 041 selectFrame("iframeportlet"); 042 waitAndClickByXpath("//button[contains(.,'earch')]"); 043 Thread.sleep(3000); 044 waitForPageToLoad(); 045 driver.findElement(By.tagName("body")).getText().contains("Actions"); // there are no actions, but the header is the only unique text from searching 046 waitAndClickByLinkText("1000"); 047 waitForPageToLoad(); 048 049 driver.findElement(By.tagName("body")).getText().contains("Attribute Inquiry"); 050 driver.findElement(By.tagName("body")).getText().contains("KRMS Attributes"); 051 driver.findElement(By.tagName("body")).getText().contains("Attribute Label"); 052 driver.findElement(By.tagName("body")).getText().contains("1000"); 053 driver.findElement(By.tagName("body")).getText().contains("peopleFlowId"); 054 driver.findElement(By.tagName("body")).getText().contains("KR-RULE"); 055 driver.findElement(By.tagName("body")).getText().contains("PeopleFlow"); 056 // selectFrame("name=fancybox-frame1343151577256"); // TODO parse source to get name 057 // waitAndClick("css=button:contains(Close)"); // looks lower case, but is upper 058 // Thread.sleep(500); 059 // waitAndClick("css=button:contains(cancel)"); 060 061 // AttributeDefinition's don't have actions (yet) 062 // waitAndClick("id=u80"); 063 // waitForPageToLoad(); 064 // waitAndClick("id=u86"); 065 // waitForPageToLoad(); 066 // selectWindow("null"); 067 // waitAndClick("xpath=(//input[@name='imageField'])[2]"); 068 // waitForPageToLoad(); 069 passed(); 070 } 071 }