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
10
11
12 public class DocumentSearchURLParametersIT_testBasicSearchFields extends DocumentSearchURLParametersITBase {
13 @Test
14 public void testBasicSearchFields() throws InterruptedException{
15
16 driver.get(getDocSearchURL(BASIC_FIELDS));
17
18 assertInputValues(BASIC_FIELDS);
19
20 driver.findElement(By.id("toggleAdvancedSearch")).click();
21
22 Map<String, String> expected = new HashMap<String, String>(BASIC_FIELDS);
23 for (Map.Entry<String, String> entry: ADVANCED_FIELDS.entrySet()) {
24 if (!"isAdvancedSearch".equals(entry.getKey())) {
25 expected.put(entry.getKey(), "");
26 } else {
27 expected.put(entry.getKey(), entry.getValue());
28 }
29 }
30 assertInputValues(expected);
31 }
32
33 }