001/** 002 * Copyright 2005-2013 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.krad.demo.lookup.resultlimit; 017 018import edu.samplu.common.SmokeTestBase; 019import org.junit.Ignore; 020import org.junit.Test; 021 022/** 023 * @author Kuali Rice Team (rice.collab@kuali.org) 024 */ 025public class DemoSampleLookUpResultLimitSmokeTest extends SmokeTestBase { 026 027 /** 028 * /kr-krad/lookup?methodToCall=start&viewId=LookupSampleViewResultsLimit&hideReturnLink=true 029 */ 030 public static final String BOOKMARK_URL = "/kr-krad/lookup?methodToCall=start&viewId=LookupSampleViewResultsLimit&hideReturnLink=true"; 031 032 /** 033 * Search 034 */ 035 public static final String SEARCH = "Search"; 036 037 @Override 038 protected String getBookmarkUrl() { 039 return BOOKMARK_URL; 040 } 041 042 @Override 043 protected void navigate() throws Exception { 044 waitAndClickById("Demo-DemoLink", ""); 045 waitAndClickByLinkText("Lookup Results Limit"); 046 } 047 048 protected void testDemoSampleLookUpResultLimit() throws Exception { 049 waitAndTypeByName("lookupCriteria[number]", "a*"); 050 waitAndClickButtonByText(SEARCH); 051 Thread.sleep(3000); 052 if(isElementPresentByXpath("//table[@class='table table-condensed table-bordered uif-tableCollectionLayout dataTable']/tbody/tr[3]")) { 053 fail("Search Results contains more than 2 rows."); 054 } 055 } 056 057 @Ignore // this demo page has been removed 058 @Test 059 public void testDemoSampleLookUpResultLimitNav() throws Exception { 060 testDemoSampleLookUpResultLimit(); 061 passed(); 062 } 063 064 @Ignore // this demo page has been removed 065 @Test 066 public void testDemoDemoSampleLookUpResultLimitBookmark() throws Exception { 067 testDemoSampleLookUpResultLimit(); 068 passed(); 069 } 070}