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
bd816682
Commit
bd816682
authored
Mar 10, 2021
by
Minh Nguyen
Committed by
Nathan Friend
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand nested stopped environments
parent
e812cfc1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
28 deletions
+63
-28
app/assets/javascripts/environments/components/environments_app.vue
.../javascripts/environments/components/environments_app.vue
+1
-1
app/assets/javascripts/environments/services/environments_service.js
...javascripts/environments/services/environments_service.js
+2
-2
changelogs/unreleased/expand-stopped-env.yml
changelogs/unreleased/expand-stopped-env.yml
+5
-0
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+55
-25
No files found.
app/assets/javascripts/environments/components/environments_app.vue
View file @
bd816682
...
@@ -85,7 +85,7 @@ export default {
...
@@ -85,7 +85,7 @@ export default {
this
.
store
.
updateEnvironmentProp
(
folder
,
'
isLoadingFolderContent
'
,
showLoader
);
this
.
store
.
updateEnvironmentProp
(
folder
,
'
isLoadingFolderContent
'
,
showLoader
);
this
.
service
this
.
service
.
getFolderContent
(
folder
.
folder_path
)
.
getFolderContent
(
folder
.
folder_path
,
folder
.
state
)
.
then
((
response
)
=>
this
.
store
.
setfolderContent
(
folder
,
response
.
data
.
environments
))
.
then
((
response
)
=>
this
.
store
.
setfolderContent
(
folder
,
response
.
data
.
environments
))
.
then
(()
=>
this
.
store
.
updateEnvironmentProp
(
folder
,
'
isLoadingFolderContent
'
,
false
))
.
then
(()
=>
this
.
store
.
updateEnvironmentProp
(
folder
,
'
isLoadingFolderContent
'
,
false
))
.
catch
(()
=>
{
.
catch
(()
=>
{
...
...
app/assets/javascripts/environments/services/environments_service.js
View file @
bd816682
...
@@ -21,7 +21,7 @@ export default class EnvironmentsService {
...
@@ -21,7 +21,7 @@ export default class EnvironmentsService {
return
axios
.
delete
(
endpoint
,
{});
return
axios
.
delete
(
endpoint
,
{});
}
}
getFolderContent
(
folderUrl
)
{
getFolderContent
(
folderUrl
,
scope
)
{
return
axios
.
get
(
`
${
folderUrl
}
.json?per_page=
${
this
.
folderResults
}
`
);
return
axios
.
get
(
`
${
folderUrl
}
.json?per_page=
${
this
.
folderResults
}
&scope=
${
scope
}
`
);
}
}
}
}
changelogs/unreleased/expand-stopped-env.yml
0 → 100644
View file @
bd816682
---
title
:
Expand nested stopped environments
merge_request
:
55676
author
:
type
:
changed
spec/features/projects/environments/environments_spec.rb
View file @
bd816682
...
@@ -429,37 +429,67 @@ RSpec.describe 'Environments page', :js do
...
@@ -429,37 +429,67 @@ RSpec.describe 'Environments page', :js do
end
end
describe
'environments folders'
do
describe
'environments folders'
do
before
do
describe
'available environments'
do
create
(
:environment
,
:will_auto_stop
,
before
do
project:
project
,
create
(
:environment
,
:will_auto_stop
,
name:
'staging/review-1'
,
project:
project
,
state: :available
)
name:
'staging/review-1'
,
create
(
:environment
,
:will_auto_stop
,
state: :available
)
project:
project
,
create
(
:environment
,
:will_auto_stop
,
name:
'staging/review-2'
,
project:
project
,
state: :available
)
name:
'staging/review-2'
,
end
state: :available
)
end
it
'users unfurls an environment folder'
do
it
'users unfurls an environment folder'
do
visit_environments
(
project
)
visit_environments
(
project
)
expect
(
page
).
not_to
have_content
'review-1'
expect
(
page
).
not_to
have_content
'review-1'
expect
(
page
).
not_to
have_content
'review-2'
expect
(
page
).
not_to
have_content
'review-2'
expect
(
page
).
to
have_content
'staging 2'
expect
(
page
).
to
have_content
'staging 2'
within
(
'.folder-row'
)
do
within
(
'.folder-row'
)
do
find
(
'.folder-name'
,
text:
'staging'
).
click
find
(
'.folder-name'
,
text:
'staging'
).
click
end
end
expect
(
page
).
to
have_content
'review-1'
expect
(
page
).
to
have_content
'review-1'
expect
(
page
).
to
have_content
'review-2'
expect
(
page
).
to
have_content
'review-2'
within
(
'.ci-table'
)
do
within
(
'.ci-table'
)
do
within
(
'[data-qa-selector="environment_item"]'
,
text:
'review-1'
)
do
within
(
'[data-qa-selector="environment_item"]'
,
text:
'review-1'
)
do
expect
(
find
(
'.js-auto-stop'
).
text
).
not_to
be_empty
expect
(
find
(
'.js-auto-stop'
).
text
).
not_to
be_empty
end
within
(
'[data-qa-selector="environment_item"]'
,
text:
'review-2'
)
do
expect
(
find
(
'.js-auto-stop'
).
text
).
not_to
be_empty
end
end
end
within
(
'[data-qa-selector="environment_item"]'
,
text:
'review-2'
)
do
end
expect
(
find
(
'.js-auto-stop'
).
text
).
not_to
be_empty
end
describe
'stopped environments'
do
before
do
create
(
:environment
,
:will_auto_stop
,
project:
project
,
name:
'staging/review-1'
,
state: :stopped
)
create
(
:environment
,
:will_auto_stop
,
project:
project
,
name:
'staging/review-2'
,
state: :stopped
)
end
it
'users unfurls an environment folder'
do
visit_environments
(
project
,
scope:
'stopped'
)
expect
(
page
).
not_to
have_content
'review-1'
expect
(
page
).
not_to
have_content
'review-2'
expect
(
page
).
to
have_content
'staging 2'
within
(
'.folder-row'
)
do
find
(
'.folder-name'
,
text:
'staging'
).
click
end
end
expect
(
page
).
to
have_content
'review-1'
expect
(
page
).
to
have_content
'review-2'
end
end
end
end
end
end
...
...
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