Add * automatically to normal queries.
This commit is contained in:
parent
9717296f7d
commit
72d22ad56b
4 changed files with 13 additions and 8 deletions
|
@ -185,6 +185,11 @@ return search result
|
||||||
data['query']['bool']['must'] = []
|
data['query']['bool']['must'] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# add * on simple query search
|
||||||
|
if query && query =~ /^\w+$/
|
||||||
|
query += '*'
|
||||||
|
end
|
||||||
|
|
||||||
# real search condition
|
# real search condition
|
||||||
condition = {
|
condition = {
|
||||||
'query_string' => {
|
'query_string' => {
|
||||||
|
|
|
@ -16,7 +16,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
# create new ticket
|
# create new ticket
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico*',
|
customer: 'nico',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'overview count test #1',
|
title: 'overview count test #1',
|
||||||
body: 'overview count test #1',
|
body: 'overview count test #1',
|
||||||
|
@ -24,7 +24,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
ticket2 = ticket_create(
|
ticket2 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico*',
|
customer: 'nico',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'overview count test #2',
|
title: 'overview count test #2',
|
||||||
body: 'overview count test #2',
|
body: 'overview count test #2',
|
||||||
|
@ -178,7 +178,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
# create new ticket
|
# create new ticket
|
||||||
ticket3 = ticket_create(
|
ticket3 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico*',
|
customer: 'nico',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'overview count test #3',
|
title: 'overview count test #3',
|
||||||
body: 'overview count test #3',
|
body: 'overview count test #3',
|
||||||
|
|
|
@ -52,7 +52,7 @@ class AgentTicketOverviewLevel1Test < TestCase
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
browser: browser1,
|
browser: browser1,
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico*',
|
customer: 'nico',
|
||||||
priority: '1 low',
|
priority: '1 low',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'overview #1',
|
title: 'overview #1',
|
||||||
|
@ -69,7 +69,7 @@ class AgentTicketOverviewLevel1Test < TestCase
|
||||||
ticket2 = ticket_create(
|
ticket2 = ticket_create(
|
||||||
browser: browser1,
|
browser: browser1,
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico*',
|
customer: 'nico',
|
||||||
priority: '1 low',
|
priority: '1 low',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'overview #2',
|
title: 'overview #2',
|
||||||
|
@ -80,7 +80,7 @@ class AgentTicketOverviewLevel1Test < TestCase
|
||||||
ticket3 = ticket_create(
|
ticket3 = ticket_create(
|
||||||
browser: browser1,
|
browser: browser1,
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico*',
|
customer: 'nico',
|
||||||
priority: '1 low',
|
priority: '1 low',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'overview #3',
|
title: 'overview #3',
|
||||||
|
|
|
@ -1219,7 +1219,7 @@ wait untill text in selector disabppears
|
||||||
element.clear
|
element.clear
|
||||||
|
|
||||||
# workaround, sometimes focus is not triggered
|
# workaround, sometimes focus is not triggered
|
||||||
element.send_keys(params[:customer] + '*')
|
element.send_keys(params[:customer])
|
||||||
sleep 3.5
|
sleep 3.5
|
||||||
|
|
||||||
# check if pulldown is open, it's not working stable via selenium
|
# check if pulldown is open, it's not working stable via selenium
|
||||||
|
@ -1487,7 +1487,7 @@ wait untill text in selector disabppears
|
||||||
element.clear
|
element.clear
|
||||||
|
|
||||||
# workaround, sometimes focus is not triggered
|
# workaround, sometimes focus is not triggered
|
||||||
element.send_keys(data[:customer] + '*')
|
element.send_keys(data[:customer])
|
||||||
sleep 3.5
|
sleep 3.5
|
||||||
|
|
||||||
# check if pulldown is open, it's not working stable via selenium
|
# check if pulldown is open, it's not working stable via selenium
|
||||||
|
|
Loading…
Reference in a new issue