2015-02-20 13:40:51 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
require 'browser_test_helper'
|
|
|
|
|
|
|
|
class AgentTicketOverviewLevel0Test < TestCase
|
|
|
|
def test_I
|
2015-02-22 12:28:34 +00:00
|
|
|
@browser = browser_instance
|
|
|
|
login(
|
|
|
|
:username => 'master@example.com',
|
|
|
|
:password => 'test',
|
|
|
|
:url => browser_url,
|
|
|
|
)
|
|
|
|
tasks_close_all()
|
2015-02-20 13:40:51 +00:00
|
|
|
|
2015-02-22 12:28:34 +00:00
|
|
|
# remember current overview count
|
|
|
|
overview_counter_before = overview_counter()
|
2015-02-20 13:40:51 +00:00
|
|
|
|
2015-02-22 12:28:34 +00:00
|
|
|
# create new ticket
|
|
|
|
ticket1 = ticket_create(
|
|
|
|
:data => {
|
|
|
|
:customer => 'nico*',
|
|
|
|
:group => 'Users',
|
|
|
|
:title => 'overview count test #1',
|
|
|
|
:body => 'overview count test #1',
|
|
|
|
}
|
|
|
|
)
|
|
|
|
sleep 8
|
2015-02-20 13:40:51 +00:00
|
|
|
|
2015-02-22 12:28:34 +00:00
|
|
|
# get new overview count
|
|
|
|
overview_counter_new = overview_counter()
|
|
|
|
assert_equal( overview_counter_before['#ticket/view/all_unassigned'] + 1, overview_counter_new['#ticket/view/all_unassigned'] )
|
2015-02-20 13:40:51 +00:00
|
|
|
|
2015-02-22 12:28:34 +00:00
|
|
|
# open ticket by search
|
|
|
|
ticket_open_by_search(
|
|
|
|
:number => ticket1[:number],
|
|
|
|
)
|
2015-02-20 13:40:51 +00:00
|
|
|
|
2015-02-22 12:28:34 +00:00
|
|
|
# close ticket
|
|
|
|
ticket_update(
|
|
|
|
:data => {
|
|
|
|
:state => 'closed',
|
|
|
|
}
|
|
|
|
)
|
|
|
|
sleep 8
|
2015-02-20 13:40:51 +00:00
|
|
|
|
2015-02-22 12:28:34 +00:00
|
|
|
# get current overview count
|
|
|
|
overview_counter_after = overview_counter()
|
|
|
|
assert_equal( overview_counter_before['#ticket/view/all_unassigned'], overview_counter_after['#ticket/view/all_unassigned'] )
|
2015-02-20 13:40:51 +00:00
|
|
|
end
|
2015-02-22 12:28:34 +00:00
|
|
|
end
|