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
68fe7aa6
Commit
68fe7aa6
authored
Jan 13, 2020
by
Miguel Rincon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable time window while envs load
parent
f0b119c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
ee/app/assets/javascripts/logs/components/environment_logs.vue
...p/assets/javascripts/logs/components/environment_logs.vue
+2
-0
ee/spec/frontend/logs/components/environment_logs_spec.js
ee/spec/frontend/logs/components/environment_logs_spec.js
+14
-1
No files found.
ee/app/assets/javascripts/logs/components/environment_logs.vue
View file @
68fe7aa6
...
@@ -195,6 +195,8 @@ export default {
...
@@ -195,6 +195,8 @@ export default {
>
>
<gl-dropdown
<gl-dropdown
id=
"time-window-dropdown"
id=
"time-window-dropdown"
ref=
"time-window-dropdown"
:disabled=
"environments.isLoading"
:text=
"timeWindow.options[timeWindow.current].label"
:text=
"timeWindow.options[timeWindow.current].label"
class=
"d-flex"
class=
"d-flex"
toggle-class=
"dropdown-menu-toggle"
toggle-class=
"dropdown-menu-toggle"
...
...
ee/spec/frontend/logs/components/environment_logs_spec.js
View file @
68fe7aa6
...
@@ -44,6 +44,8 @@ describe('EnvironmentLogs', () => {
...
@@ -44,6 +44,8 @@ describe('EnvironmentLogs', () => {
const
findEnvironmentsDropdown
=
()
=>
wrapper
.
find
(
'
.js-environments-dropdown
'
);
const
findEnvironmentsDropdown
=
()
=>
wrapper
.
find
(
'
.js-environments-dropdown
'
);
const
findPodsDropdown
=
()
=>
wrapper
.
find
(
'
.js-pods-dropdown
'
);
const
findPodsDropdown
=
()
=>
wrapper
.
find
(
'
.js-pods-dropdown
'
);
const
findSearchBar
=
()
=>
wrapper
.
find
(
'
.js-logs-search
'
);
const
findSearchBar
=
()
=>
wrapper
.
find
(
'
.js-logs-search
'
);
const
findTimeWindowDropdown
=
()
=>
wrapper
.
find
({
ref
:
'
time-window-dropdown
'
});
const
findLogControlButtons
=
()
=>
wrapper
.
find
({
name
:
'
log-control-buttons-stub
'
});
const
findLogControlButtons
=
()
=>
wrapper
.
find
({
name
:
'
log-control-buttons-stub
'
});
const
findLogTrace
=
()
=>
wrapper
.
find
(
'
.js-log-trace
'
);
const
findLogTrace
=
()
=>
wrapper
.
find
(
'
.js-log-trace
'
);
...
@@ -140,6 +142,10 @@ describe('EnvironmentLogs', () => {
...
@@ -140,6 +142,10 @@ describe('EnvironmentLogs', () => {
expect
(
findSearchBar
().
attributes
(
'
disabled
'
)).
toEqual
(
'
true
'
);
expect
(
findSearchBar
().
attributes
(
'
disabled
'
)).
toEqual
(
'
true
'
);
});
});
it
(
'
displays a disabled time window dropdown
'
,
()
=>
{
expect
(
findTimeWindowDropdown
().
attributes
(
'
disabled
'
)).
toEqual
(
'
true
'
);
});
it
(
'
does not update buttons state
'
,
()
=>
{
it
(
'
does not update buttons state
'
,
()
=>
{
expect
(
updateControlBtnsMock
).
not
.
toHaveBeenCalled
();
expect
(
updateControlBtnsMock
).
not
.
toHaveBeenCalled
();
});
});
...
@@ -162,8 +168,10 @@ describe('EnvironmentLogs', () => {
...
@@ -162,8 +168,10 @@ describe('EnvironmentLogs', () => {
initWrapper
();
initWrapper
();
});
});
it
(
"
doesn't display the search bar
"
,
()
=>
{
it
(
"
doesn't display the search bar
or time windows dropdown
"
,
()
=>
{
expect
(
findSearchBar
().
exists
()).
toEqual
(
false
);
expect
(
findSearchBar
().
exists
()).
toEqual
(
false
);
expect
(
findTimeWindowDropdown
().
exists
()).
toEqual
(
false
);
expect
(
wrapper
.
find
(
'
#environments-dropdown-fg
'
).
attributes
(
'
class
'
)).
toEqual
(
'
col-6
'
);
expect
(
wrapper
.
find
(
'
#environments-dropdown-fg
'
).
attributes
(
'
class
'
)).
toEqual
(
'
col-6
'
);
expect
(
wrapper
.
find
(
'
#pods-dropdown-fg
'
).
attributes
(
'
class
'
)).
toEqual
(
'
col-6
'
);
expect
(
wrapper
.
find
(
'
#pods-dropdown-fg
'
).
attributes
(
'
class
'
)).
toEqual
(
'
col-6
'
);
});
});
...
@@ -265,6 +273,11 @@ describe('EnvironmentLogs', () => {
...
@@ -265,6 +273,11 @@ describe('EnvironmentLogs', () => {
expect
(
wrapper
.
find
(
'
#search-fg
'
).
attributes
(
'
class
'
)).
toEqual
(
'
col-3
'
);
expect
(
wrapper
.
find
(
'
#search-fg
'
).
attributes
(
'
class
'
)).
toEqual
(
'
col-3
'
);
});
});
it
(
'
displays and enables the time window dropdown
'
,
()
=>
{
expect
(
findTimeWindowDropdown
().
exists
()).
toEqual
(
true
);
expect
(
findTimeWindowDropdown
().
attributes
(
'
disabled
'
)).
toEqual
(
undefined
);
});
it
(
'
update control buttons state
'
,
()
=>
{
it
(
'
update control buttons state
'
,
()
=>
{
expect
(
updateControlBtnsMock
).
toHaveBeenCalledTimes
(
1
);
expect
(
updateControlBtnsMock
).
toHaveBeenCalledTimes
(
1
);
});
});
...
...
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