1 /* 2 * Copyright 2006-2011 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package edu.samplu.travel.krad.test; 17 18 import static junit.framework.Assert.assertEquals; 19 20 import edu.samplu.common.WebDriverLegacyITBase; 21 import org.junit.Test; 22 23 import edu.samplu.common.ITUtil; 24 import edu.samplu.common.WebDriverITBase; 25 26 /** 27 * tests whether the watermarks is work as expected even when they contain an 28 * apostrophe 29 * 30 * @author Kuali Rice Team (rice.collab@kuali.org) 31 */ 32 public class WatermarkValidationIT extends WebDriverITBase { 33 @Override 34 public String getTestUrl() { 35 return ITUtil.PORTAL; 36 } 37 38 @Test 39 /** 40 * if watermarking is ok, the cancel link will bring up a confirmation if something was typed into a textbox i.e 41 * the scripts will be working ok 42 */ 43 public void testWatermarking() throws Exception { 44 waitAndClickByLinkText("KRAD"); 45 waitAndClickByLinkText(WebDriverLegacyITBase.UIF_COMPONENTS_KITCHEN_SINK_LINK_TEXT); 46 Thread.sleep(5000); 47 //Switch to new window. 48 switchWindow(); 49 waitAndClickByLinkText("Text Controls"); 50 assertEquals("It's watermarked ",getAttributeByName("field106", "placeholder")); 51 assertEquals("Watermark... ",getAttributeByName("field110", "placeholder")); 52 } 53 }