| setTimeout |
120000 |
|
| openAndWait |
/ |
(open the main interface) |
| comment |
Wait for page to load up |
| waitForDispatchCompleted |
30000 |
|
| clickAndWait |
//a[.='Admin'] |
|
| selectWindow |
queryFetcher |
(hereafter, all selenium commands will act within the context of this iframe |
| comment |
Go to saved searches page |
| clickAndWait |
//a[@href='/admin/saved'] |
|
| comment |
Click the 'create' button |
| clickAndWait |
//input[@value='Create'] |
|
| pause |
500 |
|
| type |
name |
alert-test-1 |
| type |
query |
monkey starthourssago=24 |
| comment |
HERE DOWN SHOULD BE THE SAME IN BOTH TESTS |
| comment |
check the 'run this on a schedule' checkbox |
| click |
enableSched |
|
| comment |
Verify that it loads in 'basic' mode. |
| verifyVisible |
basicschedule |
|
| verifyNotVisible |
cronschedule |
|
| comment |
Check that clicking 'cron' switches it to cron mode. |
| click |
basicOrCron_cron |
|
| verifyNotVisible |
basicschedule |
|
| verifyVisible |
cronschedule |
|
| comment |
Entering a cron string that IS in the pulldown, and switch back to basic. |
| type |
cronschedule |
0 0 * * * |
| click |
basicOrCron_basic |
|
| comment |
check visibilities are right |
| verifyVisible |
basicschedule |
|
| verifyNotVisible |
cronschedule |
|
| comment |
pulldown should now show 'day at midnight' |
| verifySelected |
basicschedule |
day at midnight |
| comment |
switch the basic fields to '30 minutes', switch back to cron |
| select |
basicschedule |
30 minutes |
| click |
basicOrCron_cron |
|
| comment |
cron string should be correct. |
| verifyValue |
cronschedule |
*/2 * * * * |
| comment |
HERE UP SHOULD BE THE SAME IN BOTH TESTS |
| comment |
save it. |
| clickAndWait |
//input[@value='Save'] |
|
| comment |
Verify it saved with the values we gave it. |
| verifyText |
//td[.='alert-test-1']/following-sibling::td[2] |
* Every 30 minutes * |
| verifyText |
//td[.='alert-test-1']/following-sibling::td[2] |
Yes* |
| comment |
Go back to edit it. |
| clickAndWait |
//a[.='alert-test-1'] |
|
| comment |
check it loaded showing the schedule is enabled. |
| verifyChecked |
enableSched |
|
| comment |
check the box to switch to cron |
| click |
basicOrCron_cron |
|
| comment |
set the search to run every 5 minutes. |
| type |
cronschedule |
*/12 * * * * |
| comment |
set the alert to output if number of events is greater than 5. |
| select |
//select[@name='counttype'] |
number of events |
| select |
//select[@name='relation'] |
greater than |
| type |
//input[@name='quantity'] |
5 |
| comment |
set the alert to output if number of events is greater than 5. |
| check |
action_rss |
check the create rss feed box |
| comment |
enter an email address |
| type |
//input[@name='action_email'] |
joe@example.com |
| comment |
attach results |
| check |
sendresults |
|
| comment |
save it. |
| clickAndWait |
//input[@value='Save'] |
|
| comment |
edit it again. |
| clickAndWait |
//a[.='alert-test-1'] |
|
| comment |
Make sure our changes stuck. |
| verifyValue |
//input[@name='action_email'] |
joe@example.com |
| click |
basicOrCron_cron |
|
| verifyValue |
cronschedule |
*/12 * * * * |
| verifySelectedLabel |
//select[@name='counttype'] |
number of events |
| verifySelectedLabel |
//select[@name='relation'] |
greater than |
| verifyValue |
//input[@name='quantity'] |
5 |
| clickAndWait |
//input[@value='Cancel'] |
|
| comment |
Delete it. |
| check |
//td[.='alert-test-1']/preceding-sibling::td/input[@type='checkbox'] |
Check the box for that saved search. |
| clickAndWait |
//a[.='delete'] |
Click the delete link |
| assertConfirmation |
Are you sure you want to delete the selected searches? |
|
| selectWindow |
|
(hereafter, all selenium commands will act within the context of this iframe |