View Javadoc

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 org.junit.Test;
21  
22  import edu.samplu.common.ITUtil;
23  import edu.samplu.common.WebDriverITBase;
24  
25  /**
26   * tests whether the watermarks is work as expected even when they contain an
27   * apostrophe
28   * 
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   */
31  public class WatermarkValidationIT extends WebDriverITBase {
32  	@Override
33  	public String getTestUrl() {
34  		return ITUtil.PORTAL;
35  	}
36  
37  	@Test
38  	/**
39  	 * if watermarking is ok, the cancel link will bring up a confirmation if something was typed into a textbox i.e
40  	 * the scripts will be working ok
41  	 */
42  	public void testWatermarking() throws Exception {
43  		waitAndClickByLinkText("KRAD");
44  		Thread.sleep(5000);
45  		waitAndClickByLinkText("Uif Components (Kitchen Sink)");
46  		Thread.sleep(5000);
47  		Thread.sleep(2000);
48  		//Switch to new window.
49  		switchWindow();
50  		Thread.sleep(3000);
51  		assertEquals("It's watermarked ",getAttributeByName("field106", "placeholder"));
52  		assertEquals("Watermark... ",getAttributeByName("field110", "placeholder"));
53  	}
54  }