Filtering on indexed fields.
-Verifies that the field picker works to remove and add indexed fields
-Verifies that the field picker works to filter on indexed fields, add field to search, clear field
setTimeout 120000
comment Reset the field picker preference
open /v3/prefs/set?selectedKeys=host%20sourcetype%20source
openAndWait / (open the main interface)
comment Wait for page to load up
waitForDispatchCompleted 60000
type entry source="*access.combined.log"
select timelineValues value=ALL_TIME
comment Type search string and click submit
type entry source="*access.combined.log"
click entrySubmit (Click submit button)
comment Wait for query to load
waitForDispatchCompleted 60000
pause 200
comment Verify that host values are there inline
verifyElementPresent //div[@id='r0']//label[@term='localhost']
verifyElementPresent //div[@id='filterTabs']//div[@searchkey='host']
comment Open All filters layer
click allFiltersTab
waitForDispatchCompleted 120000
pause 2000
verifyElementPresent allFiltersFilterLayer
verifyElementPresent //div[@id='allFiltersFilterLayer']//label[@term='host']
comment Uncheck 'host'
click //div[@id='allFiltersFilterLayer']//label[@term='host'] Uncheck the hosts checkbox.
click fieldApply Click the Apply button to re-run the search.
pause 500
waitForDispatchCompleted 60000
pause 4000
comment Verify that the host field is now gone
verifyElementNotPresent //div[@id='r0']//div[@class='metadata']/label[@term='localhost']
verifyElementNotPresent //div[@id='filterTabs']//div[@searchkey='host']
comment Open Field picker again
click allFiltersTab
waitForDispatchCompleted 120000
pause 1000
comment check 'host' again
click //div[@id='allFiltersFilterLayer']//label[@term='host'] check the hosts checkbox.
click fieldApply Click the Apply button to re-run the search.
pause 500
waitForDispatchCompleted 60000
pause 500
verifyElementPresent //div[@id='r0']//label[@term='localhost']
verifyElementPresent //div[@id='filterTabs']//div[@searchkey='host']
comment verify that filtering works for indexed fields
type entry webdev 10.1.1 ( source="*apache.error.log" OR source="*access.combined.log" )
click entrySubmit (Click submit button)
comment Wait for query to load
waitForDispatchCompleted 60000
comment Check that the tab is there.
verifyElementPresent //div[@id='filterTabs']//div[@searchkey='sourcetype']
comment click the sourcetype tab
click //div[@id='filterTabs']//div[@searchkey='sourcetype']
comment check the filter layers elements are there.
verifyElementPresent //tr[@term='apache_error']/td
verifyElementPresent //tr[@term='access_combined']/td
comment Give them 2 seconds max to show up.
waitForVisible //tr[@term='access_combined']/td 2000
verifyVisible //tr[@term='access_combined']/td 2000
comment Check the other one is visible too.
waitForVisible //tr[@term='apache_error']/td 2000
verifyVisible //tr[@term='apache_error']/td
verifyText //tr[@term='access_combined']/td access_combined (4517)
verifyText //tr[@term='apache_error']/td apache_error (5)
comment Verify that clicking a filter narrows the search to just those key values
click //tr[@term='apache_error']/td
pause 1000
waitForDispatchCompleted 60000
verifyText currentFilter Filtering on sourcetype="apache_error"
verifyText //div[@id='r0']//pre [Thu Jun 9 14:41:52 2005] [error] [client 10.1.1.003] user webdev: authentication failure for "/index.php": password mismatch
verifyText //div[@id='r4']//pre [Wed May 18 12:46:13 2005] [error] [client 10.1.1.140] user webdev: authentication failure for "/": password mismatch
comment Verify that the global clear filters link works.
click clearFilter
pause 500
waitForDispatchCompleted 60000
pause 500
verifyText eventCount 4,522 results
comment Click filters again, this time the other sourcetype
click //div[@id='filterTabs']//div[@searchkey='sourcetype']
click //tr[@term='access_combined']/td
pause 1000
waitForDispatchCompleted 60000
verifyText currentFilter Filtering on sourcetype="access_combined"
comment Verify that the clear filters links within particular tabs work.
click //div[@id='filterLayers']//div[@key='sourcetype']//a[@class='clearFilter']
waitForDispatchCompleted 60000
verifyText eventCount 4,522 results