Added oder of article, sometimes on postgresql it's different.
This commit is contained in:
parent
07148ea064
commit
10e0592140
2 changed files with 22 additions and 33 deletions
|
@ -119,7 +119,6 @@ class TicketsController < ApplicationController
|
||||||
group_ids = Group.select('groups.id')
|
group_ids = Group.select('groups.id')
|
||||||
.joins(:users)
|
.joins(:users)
|
||||||
.where('groups_users.user_id = ?', current_user.id)
|
.where('groups_users.user_id = ?', current_user.id)
|
||||||
.where( 'groups.active = ?', true )
|
|
||||||
.map(&:id)
|
.map(&:id)
|
||||||
|
|
||||||
access_condition = [ 'group_id IN (?)', group_ids ]
|
access_condition = [ 'group_id IN (?)', group_ids ]
|
||||||
|
@ -225,7 +224,7 @@ class TicketsController < ApplicationController
|
||||||
assets = ticket.assets(assets)
|
assets = ticket.assets(assets)
|
||||||
|
|
||||||
# get related articles
|
# get related articles
|
||||||
articles = Ticket::Article.where(ticket_id: params[:id])
|
articles = Ticket::Article.where(ticket_id: params[:id]).order('created_at ASC, id ASC')
|
||||||
|
|
||||||
# get related users
|
# get related users
|
||||||
article_ids = []
|
article_ids = []
|
||||||
|
|
|
@ -53,7 +53,7 @@ class AgentTicketActionLevel6Test < TestCase
|
||||||
|
|
||||||
# check if ticket is shown and attachment exists
|
# check if ticket is shown and attachment exists
|
||||||
location_check(url: '#ticket/zoom/')
|
location_check(url: '#ticket/zoom/')
|
||||||
sleep 4
|
sleep 2
|
||||||
ticket_number = @browser.find_elements({ css: '.active .ticketZoom-header .ticket-number' })[0].text
|
ticket_number = @browser.find_elements({ css: '.active .ticketZoom-header .ticket-number' })[0].text
|
||||||
match(
|
match(
|
||||||
css: '.active .ticket-article-item:nth-child(1) .attachments',
|
css: '.active .ticket-article-item:nth-child(1) .attachments',
|
||||||
|
@ -77,9 +77,7 @@ class AgentTicketActionLevel6Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# submit form
|
# submit form
|
||||||
click(
|
click(css: '.active .js-submit')
|
||||||
css: '.active .js-submit',
|
|
||||||
)
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# check warning
|
# check warning
|
||||||
|
@ -93,9 +91,7 @@ class AgentTicketActionLevel6Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# submit form
|
# submit form
|
||||||
click(
|
click(css: '.active .js-submit')
|
||||||
css: '.active .js-submit',
|
|
||||||
)
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# no warning
|
# no warning
|
||||||
|
@ -136,9 +132,7 @@ class AgentTicketActionLevel6Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# submit form
|
# submit form
|
||||||
click(
|
click(css: '.active .js-submit')
|
||||||
css: '.active .js-submit',
|
|
||||||
)
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# check warning
|
# check warning
|
||||||
|
@ -146,9 +140,7 @@ class AgentTicketActionLevel6Test < TestCase
|
||||||
css: '.active .modal',
|
css: '.active .modal',
|
||||||
value: 'missing',
|
value: 'missing',
|
||||||
)
|
)
|
||||||
click(
|
click(css: '.active .modal .js-cancel')
|
||||||
css: '.active .modal .js-cancel',
|
|
||||||
)
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
ticket_update(
|
ticket_update(
|
||||||
|
@ -159,9 +151,7 @@ class AgentTicketActionLevel6Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# submit form
|
# submit form
|
||||||
click(
|
click(css: '.active .js-submit')
|
||||||
css: '.active .js-submit',
|
|
||||||
)
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# discard changes should gone away
|
# discard changes should gone away
|
||||||
|
|
Loading…
Reference in a new issue