001package edu.samplu.admin.test;
002
003import org.junit.Test;
004import org.openqa.selenium.By;
005
006import java.util.HashMap;
007import java.util.Map;
008
009/**
010 * @author Kuali Rice Team (rice.collab@kuali.org)
011 */
012public class DocumentSearchURLParametersIT_testBasicSearchFields extends DocumentSearchURLParametersITBase {
013    @Test
014    public void testBasicSearchFields() throws InterruptedException{
015        // criteria.initiator=delyea&criteria.docTypeFullName=" + documentTypeName +
016        driver.get(getDocSearchURL(BASIC_FIELDS));
017
018        assertInputValues(BASIC_FIELDS);
019
020        driver.findElement(By.id("toggleAdvancedSearch")).click();
021
022        Map<String, String> expected = new HashMap<String, String>(BASIC_FIELDS);
023        for (Map.Entry<String, String> entry: ADVANCED_FIELDS.entrySet()) {
024            if (!"isAdvancedSearch".equals(entry.getKey())) {
025                expected.put(entry.getKey(), "");
026            } else {
027                expected.put(entry.getKey(), entry.getValue());
028            }
029        }
030        assertInputValues(expected);
031    }
032
033}