View Javadoc
1   /**
2    * Copyright 2005-2014 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 org.kuali.rice.krad.labs.kitchensink;
17  
18  import org.junit.Test;
19  
20  /**
21   * @author Kuali Rice Team (rice.collab@kuali.org)
22   */
23  
24  public class LabsValidationRegexAft extends LabsKitchenSinkBase {
25  
26      public static final String BOOKMARK_URL = "/kr-krad/uicomponents?viewId=UifCompView&formKey=4e87b0ca-c718-49c2-ac6d-f86e8dbabf6c&cacheKey=ca03hvydzk027i3l2hw0ldkuik&pageId=UifCompView-Page4#UifCompView-Page4";
27  
28      @Override
29      protected String getBookmarkUrl() {
30          return BOOKMARK_URL;
31      }
32  
33  	@Override
34  	protected void navigate() throws Exception {
35  		navigateToKitchenSink("Validation - Regex");
36  	}
37  	
38  	@Test
39      public void testValidationRegexBookmark() throws Exception {
40          testValidationRegex();
41          passed();
42      }
43  
44      @Test
45      public void testValidationRegexNav() throws Exception {
46          testValidationRegex();
47          passed();
48      }
49      
50      protected void testValidationRegex() throws InterruptedException 
51      {
52          assertFocusTypeBlurError("field50","1qqqqq.qqqqqq");
53          assertFocusTypeBlurError("field51","-1.0E");
54          assertFocusTypeBlurError("field77","1.2");
55          assertFocusTypeBlurError("field52","asddffgghj");
56          assertFocusTypeBlurError("field53"," :_");
57          assertFocusTypeBlurError("field54","as");
58          assertFocusTypeBlurError("field84","kuali.org");
59          assertFocusTypeBlurError("field55","1234");
60          assertFocusTypeBlurError("field75","aws");
61          assertFocusTypeBlurError("field82","12");
62          assertFocusTypeBlurError("field83","24");
63          assertFocusTypeBlurError("field57","1599");
64          assertFocusTypeBlurError("field58","0");
65          assertFocusTypeBlurError("field61","360001");
66          assertFocusTypeBlurError("field62","@#");
67          assertFocusTypeBlurError("field63","2a#");
68          assertFocusTypeBlurError("field64","1@");
69          assertFocusTypeBlurError("field76","a2");
70          assertFocusTypeBlurError("field65","a e");
71          assertFocusTypeBlurError("field66","sdfa");
72          assertFocusTypeBlurError("field67","1234-a");
73          assertFocusTypeBlurError("field68","4.a");
74          assertFocusTypeBlurError("field67","");
75      }
76  }