001    package edu.samplu.admin.test;
002    
003    import org.junit.Test;
004    
005    import java.util.HashMap;
006    import java.util.Map;
007    
008    import static com.thoughtworks.selenium.SeleneseTestBase.assertTrue;
009    
010    /**
011     * @author Kuali Rice Team (rice.collab@kuali.org)
012     */
013    public class DocumentSearchURLParametersIT_testBasicSearchFieldsAndExecuteSearchWithHiddenCriteria extends DocumentSearchURLParametersITBase {
014        @Test
015        public void testBasicSearchFieldsAndExecuteSearchWithHiddenCriteria() throws InterruptedException {
016            // criteria.initiator=delyea&criteria.docTypeFullName=" + documentTypeName +
017            Map<String, String> fields = new HashMap<String, String>();
018            fields.putAll(BASIC_FIELDS);
019            fields.put("methodToCall", "search");
020            fields.put("searchCriteriaEnabled", "NO");
021            driver.get(getDocSearchURL(fields));
022    
023            assertInputPresence(BASIC_FIELDS, false);
024    
025            // verify that it attempted the search
026            assertTrue(driver.getPageSource().contains("No values match this search"));
027    
028            // NOTE: toggling modes re-enables the search criteria
029        }
030    }