Dashboards
-Basic smoke test for dashboards.
-Tests that the metadata searches work
openAndWait / (open the main interface)
pause 2000
comment select the 'main' dashboard, if it wasnt already selected.
comment Wait for dashboard to load.
select dashboardViewSelector main
pause 500 the select onchange doesnt fire for 100ms.
waitForDispatchCompleted 30000
pause 5000
verifyElementPresent //div[@id='landingPageContainer']//span[.='Sources']
verifyElementPresent //div[@id='landingPageContainer']//span[.='Sourcetypes']
verifyElementPresent //div[@id='landingPageContainer']//span[.='Hosts']
comment Attempt to create a new dashboard called selenium
select dashboardViewSelector create new dashboard...
comment Verify it shows up, and is visible
waitForElementPresent newDashboardLayer 5000
verifyVisible newDashboardLayer
type newDashboardName selenium
click saveDashboardButton
pause 5000
waitForElementPresent msgNotificationContainer 5000
verifyText //div[@id='msgNotificationContainer']//td[@class='INFO'] You have saved a new dashboard named selenium. To add searches, select it from the dashboard list then click the Edit Content link on the right
click dashboardViewEdit
waitForElementPresent sbaFormElements 5000
click //div[@id='sbaFormElements']//label[.='Daily indexing volume by server'] Check the box for that saved search.
click //div[@id='adminPopupLayer']//input[@type='submit' and @value='Apply']
comment Hack for clearing messaging!
click logo
comment Delete dashboard selenium
select dashboardViewSelector selenium
waitForDispatchCompleted 60000
click dashboardViewDelete
assertConfirmation Are you sure you want to delete dashboard selenium?
verifyText //div[@id='msgNotificationContainer']//td[@class='INFO'] You have deleted dashboard named selenium.
comment Attempt to create a dashboard with spaces in the name
select dashboardViewSelector create new dashboard...
comment Verify it shows up, and is visible
waitForElementPresent newDashboardLayer 5000
type newDashboardName i has a space
click saveDashboardButton
pause 5000
waitForElementPresent msgNotificationContainer 5000
click dashboardViewEdit
waitForElementPresent sbaFormElements 5000
click //div[@id='sbaFormElements']//label[.='Daily indexing volume by server'] Check the box for that saved search.
click //div[@id='adminPopupLayer']//input[@type='submit' and @value='Apply']
comment Hack for clearing messaging!
click logo
comment Delete dashboard i_has_a_space
select dashboardViewSelector i has a space
waitForDispatchCompleted 60000
click dashboardViewDelete
assertConfirmation Are you sure you want to delete dashboard i_has_a_space?
verifyText //div[@id='msgNotificationContainer']//td[@class='INFO'] You have deleted dashboard named i_has_a_space.
comment Tests for the metadata command (used by all-indexed data and its view-all links).
type entry | metadata type=sources
click entrySubmit (Click submit button)
pause 1000
click reportViewToggle
waitForDispatchCompleted 120000
pause 1000
click entrySubmit (Click submit button)
comment Wait for query to load
pause 2000 for some reason waitForDispatchCompleted likes to fail here.
waitForDispatchCompleted 120000
pause 3000 for some reason waitForDispatchCompleted likes to fail here.
comment Verify that we get back some column headers.
assertElementPresent //thead[@id="reportResultHead"]//th
comment Verify that we got back source and firstTime columns.
verifyElementPresent //th/a[.='source']
verifyElementPresent //th/a[.='firstTime']
verifyElementPresent //tbody[@id='reportResultBody']//td[1]
verifyElementPresent //tbody[@id='reportResultBody']//td[2]
verifyElementPresent //tbody[@id='reportResultBody']//td[3]
comment Verify that can click home and dashboards will reload properly.
click logo
pause 500
waitForDispatchCompleted 120000
select dashboardViewSelector main
pause 2000
waitForDispatchCompleted 30000
pause 2000
verifyElementPresent //div[@id='landingPageContainer']//span[.='Sources']
verifyElementPresent //div[@id='landingPageContainer']//span[.='Sourcetypes']
verifyElementPresent //div[@id='landingPageContainer']//span[.='Hosts']
comment set the dashboard back to the main
select dashboardViewSelector main
pause 2000
click logo