1 package edu.samplu.admin.test;
2
3 import org.junit.Test;
4 import org.openqa.selenium.By;
5
6 import java.util.HashMap;
7 import java.util.Map;
8
9 import static com.thoughtworks.selenium.SeleneseTestBase.assertTrue;
10
11
12
13
14 public class DocumentSearchURLParametersIT_testAdvancedSearchFieldsAndExecuteSearch extends DocumentSearchURLParametersITBase {
15 @Test
16 public void testAdvancedSearchFieldsAndExecuteSearch() throws InterruptedException{
17
18 Map<String, String> expected = new HashMap<String, String>(BASIC_FIELDS);
19 expected.putAll(ADVANCED_FIELDS);
20
21 Map<String, String> values = new HashMap<String, String>(expected);
22 values.put("methodToCall", "search");
23 driver.get(getDocSearchURL(values));
24
25 assertInputValues(expected);
26
27
28 assertTrue(driver.getPageSource().contains("No values match this search"));
29
30 driver.findElement(By.id("toggleAdvancedSearch")).click();
31
32 assertInputValues(BASIC_FIELDS);
33 }
34 }