001/**
002 * Copyright 2005-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/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.mainmenu.test;
017
018import static org.junit.Assert.assertEquals;
019import static org.junit.Assert.assertTrue;
020
021import org.junit.After;
022import org.junit.Before;
023import org.junit.Test;
024
025import com.thoughtworks.selenium.DefaultSelenium;
026import com.thoughtworks.selenium.Selenium;
027
028
029/**
030 * TODO vchauhan don't forget to fill this in. 
031 * 
032 * @author Kuali Rice Team (rice.collab@kuali.org)
033 */
034public class TermSpecificationLookUpIT {
035
036    private Selenium selenium;
037    @Before
038    public void setUp() throws Exception {
039        selenium = new DefaultSelenium("localhost", 4444, "*firefox", System.getProperty("remote.public.url"));
040        selenium.start();
041    }
042    
043    @Test
044    public void testTermSpecificationLookUp() throws Exception {
045               
046        selenium.open(System.getProperty("remote.public.url"));
047                selenium.type("name=__login_user", "admin");
048                selenium.click("css=input[type=\"submit\"]");
049                selenium.waitForPageToLoad("30000");
050                selenium.click("link=Term Specification Lookup");
051                selenium.waitForPageToLoad("30000");
052                selenium.selectFrame("iframeportlet");
053                selenium.click("//button");
054                selenium.waitForPageToLoad("30000");
055                selenium.click("link=edit");
056                selenium.waitForPageToLoad("30000");
057                assertTrue(selenium.isTextPresent("cancel"));
058                selenium.click("link=cancel");
059                selenium.waitForPageToLoad("30000");
060        
061    }
062    
063    @After
064    public void tearDown() throws Exception {
065        selenium.stop();
066    }
067
068}