dox Executable Documentation

Logs report

Requires log in

Given I am not logged in
When I try to request a report of logs
Then AuthenticationException::$CLASS should be thrown

No logs

When I request a report of logs
Then there should be 0 logs

With logs

Given I have logged from '2001-01-01 12:00:01' until '2001-01-01 13:00:02' for 'root'
When I request a report of logs
Then there should be 1 logs
Then log 1 should have 'task' ''
Then log 1 should have 'start' '2001-01-01 12:00'
Then log 1 should have 'end' '2001-01-01 13:00'

Within time span

Given I have logged from '2011-11-11 10:00' until '2011-11-11 12:00' for 'root'
Given I have logged from '2011-11-11 12:15' until '2011-11-11 12:30' for 'root'
Given I have logged from '2011-11-11 13:00' until '2011-11-11 14:30' for 'root'
Given I have logged from '2011-11-11 15:00' until '2011-11-11 16:00' for 'root'
When I request a report of logs between '2011-11-11 11:00' and '2011-11-11 14:00'
Then there should be 3 logs
Then log 1 should have 'start' '2011-11-11 10:00'
Then log 2 should have 'start' '2011-11-11 12:15'
Then log 3 should have 'start' '2011-11-11 13:00'
Then log 3 should have 'end' '2011-11-11 14:30'
Then log 1 should have 'time' '2:00 (2.00)'
Then log 2 should have 'time' '0:15 (0.25)'
Then the total should be '3:45 (3.75)'

After date

Given I have logged from '2011-11-11 10:00' until '2011-11-11 12:00' for 'root'
Given I have logged from '2011-11-11 13:00' until '2011-11-11 15:00' for 'root'
When I request a report of logs after '2011-11-11 14:00'
Then there should be 1 logs
Then log 1 should have 'start' '2011-11-11 13:00'

Only sub tasks

Given the task 'task1' in 'root'
Given the task 'task2' in 'task1'
Given the task 'task3' in 'task2'
Given the task 'task4' in 'task1'
Given the task 'task5' in 'root'
Given I have logged from '12:00' until '13:00' for 'task1'
Given I have logged from '13:00' until '14:00' for 'task2'
Given I have logged from '14:00' until '15:00' for 'task3'
Given I have logged from '15:00' until '16:00' for 'task4'
Given I have logged from '16:00' until '17:00' for 'task5'
When I request a report of logs under 'task1'
Then there should be 4 logs
Then log 1 should have 'task' '/task1'
Then log 2 should have 'task' '/task1/task2'
Then log 3 should have 'task' '/task1/task2/task3'
Then log 4 should have 'task' '/task1/task4'

Sort by start

Given the task 'task1' in 'root'
Given the task 'task2' in 'root'
Given I have logged from '2011-11-11 12:00' until '2011-11-11 13:00' for 'task1'
Given I have logged from '2011-11-11 10:00' until '2011-11-11 11:00' for 'task2'
When I request a report of logs sorted by time
Then there should be 2 logs
Then log 1 should have 'task' '/task2'
Then log 2 should have 'task' '/task1'