2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2018-10-30 21:51:20 +00:00
|
|
|
require 'browser_test_helper'
|
|
|
|
|
|
|
|
class AgentTicketTaskChangedTest < TestCase
|
|
|
|
|
|
|
|
# regression test for issue #2042 - incorrect notification when closing a tab after setting up an object
|
|
|
|
def test_detection_of_ticket_update_after_new_attribute
|
2020-02-02 15:40:13 +00:00
|
|
|
@browser = browser_instance
|
2018-10-30 21:51:20 +00:00
|
|
|
login(
|
|
|
|
username: 'master@example.com',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2018-10-30 21:51:20 +00:00
|
|
|
)
|
2021-07-16 13:29:38 +00:00
|
|
|
tasks_close_all
|
2018-10-30 21:51:20 +00:00
|
|
|
|
2019-06-28 11:38:49 +00:00
|
|
|
ticket_create(
|
2018-10-30 21:51:20 +00:00
|
|
|
data: {
|
|
|
|
customer: 'nico',
|
2018-12-19 17:31:51 +00:00
|
|
|
group: 'Users',
|
|
|
|
title: 'test ticket',
|
|
|
|
body: 'some body 123äöü',
|
2018-10-30 21:51:20 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
object_manager_attribute_create(
|
|
|
|
data: {
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'text_test',
|
|
|
|
display: 'text_test',
|
2018-10-30 21:51:20 +00:00
|
|
|
data_type: 'Text',
|
|
|
|
},
|
|
|
|
)
|
|
|
|
object_manager_attribute_migrate
|
|
|
|
|
|
|
|
ticket_open_by_title(title: 'test ticket')
|
|
|
|
|
|
|
|
# verify the 'Discard your changes' message does not appear (since there are no changes)
|
|
|
|
assert_nil execute(js: "return $('.content.active .js-attributeBar .js-reset:not(\".hide\")').get(0)")
|
|
|
|
|
2021-07-16 13:29:38 +00:00
|
|
|
tasks_close_all
|
2018-10-30 21:51:20 +00:00
|
|
|
|
|
|
|
sleep 0.5
|
2021-07-16 13:38:01 +00:00
|
|
|
exists_not(css: '.modal')
|
2018-10-30 21:51:20 +00:00
|
|
|
|
|
|
|
object_manager_attribute_delete(
|
|
|
|
data: {
|
|
|
|
name: 'text_test',
|
|
|
|
},
|
|
|
|
)
|
|
|
|
object_manager_attribute_migrate
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|