Fixed issue #2164 - i-doit: Double click needed to select object after searching (w/o category). Fixed issue #2165 - i-doit: Setting object before filling in the ticket information removed the i-doit objects.
This commit is contained in:
parent
b358374ff5
commit
e5cd5ce845
4 changed files with 67 additions and 4 deletions
|
@ -22,11 +22,11 @@ class App.IdoitObjectSelector extends App.ControllerModal
|
||||||
|
|
||||||
@contentInline.find('.js-typeSelect').html(@renderTypeSelector(result))
|
@contentInline.find('.js-typeSelect').html(@renderTypeSelector(result))
|
||||||
|
|
||||||
@contentInline.filter('.js-search').on('change', 'select, input', (e) =>
|
@contentInline.on('change', 'input.js-shadow', (e) =>
|
||||||
params = @formParam(e.target)
|
params = @formParam(e.target)
|
||||||
@search(params)
|
@search(params)
|
||||||
)
|
)
|
||||||
@contentInline.filter('.js-search').on('keyup', 'input', (e) =>
|
@contentInline.on('keyup', 'input.js-searchField', (e) =>
|
||||||
params = @formParam(e.target)
|
params = @formParam(e.target)
|
||||||
@search(params)
|
@search(params)
|
||||||
)
|
)
|
||||||
|
|
|
@ -92,6 +92,9 @@ class SidebarIdoit extends App.Controller
|
||||||
showError: (message) =>
|
showError: (message) =>
|
||||||
@html App.i18n.translateInline(message)
|
@html App.i18n.translateInline(message)
|
||||||
|
|
||||||
|
reload: =>
|
||||||
|
@showObjectsContent()
|
||||||
|
|
||||||
delete: (objectId) =>
|
delete: (objectId) =>
|
||||||
localObjects = []
|
localObjects = []
|
||||||
for localObjectId in @objectIds
|
for localObjectId in @objectIds
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<form class="js-search flex horizontal">
|
<form class="js-search flex horizontal">
|
||||||
<div class="controls controls--select js-typeSelect"></div>
|
<div class="controls controls--select js-typeSelect"></div>
|
||||||
<input type="text" name="title" value="" autocomplete="off" placeholder="<%- @Ti('Search') %>" class="form-control"/>
|
<input type="text" name="title" value="" autocomplete="off" placeholder="<%- @Ti('Search') %>" class="form-control js-searchField"/>
|
||||||
</form>
|
</form>
|
||||||
<form class="js-result"></form>
|
<form class="js-result"></form>
|
||||||
|
|
|
@ -57,7 +57,67 @@ class IntegrationIdoitTest < TestCase
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico',
|
customer: 'nico',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'subject - i-doit integration',
|
title: 'subject - i-doit integration #1',
|
||||||
|
body: 'body - i-doit integration',
|
||||||
|
},
|
||||||
|
do_not_submit: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
# open the i-doit selection modal
|
||||||
|
click(css: '.content.active .tabsSidebar svg.icon-printer')
|
||||||
|
click(css: '.content.active .sidebar[data-tab="idoit"] .js-headline')
|
||||||
|
click(css: '.content.active .sidebar[data-tab="idoit"] .dropdown-menu')
|
||||||
|
|
||||||
|
# wait for the API call to populate the dropdown menu
|
||||||
|
watch_for(css: '.content.active .modal form input.js-input')
|
||||||
|
# open the dropdown menu and choose the Building option
|
||||||
|
click(css: '.content.active .modal form input.js-input')
|
||||||
|
click(css: ".content.active .modal form li.js-option[title='#{api_category}']")
|
||||||
|
# wait for the building results to populate from the API
|
||||||
|
watch_for(css: '.content.active .modal form.js-result table.table')
|
||||||
|
|
||||||
|
# click the check box from the first row and note its entry ID
|
||||||
|
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
||||||
|
entry_id = checkbox.attribute('value')
|
||||||
|
checkbox.click()
|
||||||
|
|
||||||
|
# submit the i-doit object selections
|
||||||
|
click(css: '.content.active .modal form button.js-submit')
|
||||||
|
|
||||||
|
# confirm that the entry have been successfully recorded
|
||||||
|
watch_for(
|
||||||
|
css: ".content.active .sidebar[data-tab='idoit'] a[href='#{api_endpoint}/?objID=#{entry_id}']",
|
||||||
|
)
|
||||||
|
|
||||||
|
# reselect the customer and verify if object is still shown in sidebar
|
||||||
|
ticket_customer_select(
|
||||||
|
css: '.content.active .newTicket',
|
||||||
|
customer: 'master',
|
||||||
|
)
|
||||||
|
|
||||||
|
watch_for(
|
||||||
|
css: ".content.active .sidebar[data-tab='idoit'] a[href='#{api_endpoint}/?objID=#{entry_id}']",
|
||||||
|
)
|
||||||
|
|
||||||
|
# now submit the ticket
|
||||||
|
click(css: '.content.active .newTicket button.js-submit')
|
||||||
|
|
||||||
|
watch_for(
|
||||||
|
css: '.content.active .ticketZoom-header .ticket-number',
|
||||||
|
)
|
||||||
|
|
||||||
|
watch_for(
|
||||||
|
css: ".content.active .sidebar[data-tab='idoit'] a[href='#{api_endpoint}/?objID=#{entry_id}']",
|
||||||
|
)
|
||||||
|
|
||||||
|
tasks_close_all()
|
||||||
|
|
||||||
|
# new create a new ticket with an i-doit object
|
||||||
|
ticket = ticket_create(
|
||||||
|
data: {
|
||||||
|
customer: 'nico',
|
||||||
|
group: 'Users',
|
||||||
|
title: 'subject - i-doit integration #2',
|
||||||
body: 'body - i-doit integration',
|
body: 'body - i-doit integration',
|
||||||
},
|
},
|
||||||
do_not_submit: true,
|
do_not_submit: true,
|
||||||
|
|
Loading…
Reference in a new issue