Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4949cd31
Commit
4949cd31
authored
Feb 03, 2020
by
Miguel Rincon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow submit to event to trigger a new search
parent
9bc1de5b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
ee/app/assets/javascripts/logs/components/environment_logs.vue
...p/assets/javascripts/logs/components/environment_logs.vue
+1
-1
ee/changelogs/unreleased/201733-logs-search-is-broken.yml
ee/changelogs/unreleased/201733-logs-search-is-broken.yml
+5
-0
ee/spec/frontend/logs/components/environment_logs_spec.js
ee/spec/frontend/logs/components/environment_logs_spec.js
+20
-2
No files found.
ee/app/assets/javascripts/logs/components/environment_logs.vue
View file @
4949cd31
...
...
@@ -204,7 +204,7 @@ export default {
class=
"js-logs-search"
type=
"search"
autofocus
@
submit=
"disableAdvancedControls && setSearch(searchQuery)"
@
submit=
"
!
disableAdvancedControls && setSearch(searchQuery)"
/>
</gl-form-group>
</div>
...
...
ee/changelogs/unreleased/201733-logs-search-is-broken.yml
0 → 100644
View file @
4949cd31
---
title
:
Allow submit to event to trigger a new search
merge_request
:
24262
author
:
type
:
fixed
ee/spec/frontend/logs/components/environment_logs_spec.js
View file @
4949cd31
...
...
@@ -13,6 +13,7 @@ import {
mockLogsResult
,
mockTrace
,
mockPodName
,
mockSearch
,
mockEnvironmentsEndpoint
,
mockDocumentationPath
,
}
from
'
../mock_data
'
;
...
...
@@ -33,6 +34,7 @@ describe('EnvironmentLogs', () => {
const
actionMocks
=
{
setInitData
:
jest
.
fn
(),
setSearch
:
jest
.
fn
(),
showPodLogs
:
jest
.
fn
(),
showEnvironment
:
jest
.
fn
(),
fetchEnvironments
:
jest
.
fn
(),
...
...
@@ -205,10 +207,19 @@ describe('EnvironmentLogs', () => {
initWrapper
();
});
it
(
'
displays a disabled search bar and time window dropdown
'
,
()
=>
{
it
(
'
displays a disabled time window dropdown
'
,
()
=>
{
expect
(
findTimeRangePicker
().
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
});
it
(
'
displays a disabled search bar
'
,
()
=>
{
expect
(
findSearchBar
().
exists
()).
toBe
(
true
);
expect
(
findSearchBar
().
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
expect
(
findTimeRangePicker
().
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
// input a query and click `search`
findSearchBar
().
vm
.
$emit
(
'
input
'
,
mockSearch
);
findSearchBar
().
vm
.
$emit
(
'
submit
'
);
expect
(
actionMocks
.
setSearch
).
not
.
toHaveBeenCalled
();
});
});
...
...
@@ -232,6 +243,13 @@ describe('EnvironmentLogs', () => {
it
(
'
displays an enabled search bar
'
,
()
=>
{
expect
(
findSearchBar
().
attributes
(
'
disabled
'
)).
toBeFalsy
();
// input a query and click `search`
findSearchBar
().
vm
.
$emit
(
'
input
'
,
mockSearch
);
findSearchBar
().
vm
.
$emit
(
'
submit
'
);
expect
(
actionMocks
.
setSearch
).
toHaveBeenCalledTimes
(
1
);
expect
(
actionMocks
.
setSearch
).
toHaveBeenCalledWith
(
mockSearch
);
});
it
(
'
displays an enabled time window dropdown
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment