001 package edu.samplu.admin.test; 002 003 import org.junit.Test; 004 import org.openqa.selenium.By; 005 006 import java.util.HashMap; 007 import java.util.Map; 008 009 import static com.thoughtworks.selenium.SeleneseTestBase.assertTrue; 010 011 /** 012 * @author Kuali Rice Team (rice.collab@kuali.org) 013 */ 014 public class DocumentSearchURLParametersIT_testAdvancedSearchFieldsAndExecuteSearch extends DocumentSearchURLParametersITBase { 015 @Test 016 public void testAdvancedSearchFieldsAndExecuteSearch() throws InterruptedException{ 017 // criteria.initiator=delyea&criteria.docTypeFullName=" + documentTypeName + 018 Map<String, String> expected = new HashMap<String, String>(BASIC_FIELDS); 019 expected.putAll(ADVANCED_FIELDS); 020 021 Map<String, String> values = new HashMap<String, String>(expected); 022 values.put("methodToCall", "search"); 023 driver.get(getDocSearchURL(values)); 024 025 assertInputValues(expected); 026 027 // verify that it attempted the search 028 assertTrue(driver.getPageSource().contains("No values match this search")); 029 030 driver.findElement(By.id("toggleAdvancedSearch")).click(); 031 032 assertInputValues(BASIC_FIELDS); 033 } 034 }