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