Added oder of article, sometimes on postgresql it's different.

This commit is contained in:
Martin Edenhofer 2016-05-22 11:37:44 +02:00
parent 07148ea064
commit 10e0592140
2 changed files with 22 additions and 33 deletions

View file

@ -119,7 +119,6 @@ class TicketsController < ApplicationController
group_ids = Group.select('groups.id')
.joins(:users)
.where('groups_users.user_id = ?', current_user.id)
.where( 'groups.active = ?', true )
.map(&:id)
access_condition = [ 'group_id IN (?)', group_ids ]
@ -225,7 +224,7 @@ class TicketsController < ApplicationController
assets = ticket.assets(assets)
# 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
article_ids = []

View file

@ -53,7 +53,7 @@ class AgentTicketActionLevel6Test < TestCase
# check if ticket is shown and attachment exists
location_check(url: '#ticket/zoom/')
sleep 4
sleep 2
ticket_number = @browser.find_elements({ css: '.active .ticketZoom-header .ticket-number' })[0].text
match(
css: '.active .ticket-article-item:nth-child(1) .attachments',
@ -77,9 +77,7 @@ class AgentTicketActionLevel6Test < TestCase
)
# submit form
click(
css: '.active .js-submit',
)
click(css: '.active .js-submit')
sleep 2
# check warning
@ -93,9 +91,7 @@ class AgentTicketActionLevel6Test < TestCase
)
# submit form
click(
css: '.active .js-submit',
)
click(css: '.active .js-submit')
sleep 2
# no warning
@ -136,9 +132,7 @@ class AgentTicketActionLevel6Test < TestCase
)
# submit form
click(
css: '.active .js-submit',
)
click(css: '.active .js-submit')
sleep 2
# check warning
@ -146,9 +140,7 @@ class AgentTicketActionLevel6Test < TestCase
css: '.active .modal',
value: 'missing',
)
click(
css: '.active .modal .js-cancel',
)
click(css: '.active .modal .js-cancel')
sleep 2
ticket_update(
@ -159,9 +151,7 @@ class AgentTicketActionLevel6Test < TestCase
)
# submit form
click(
css: '.active .js-submit',
)
click(css: '.active .js-submit')
sleep 2
# discard changes should gone away