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
bc83b303
Commit
bc83b303
authored
Oct 16, 2020
by
Angelo Gulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update files and variables names
Environment was misspelled in several places
parent
0bac6eab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
app/assets/javascripts/pages/projects/environments/index/index.js
...ts/javascripts/pages/projects/environments/index/index.js
+2
-2
spec/frontend/ci_variable_list/components/ci_environments_dropdown_spec.js
...variable_list/components/ci_environments_dropdown_spec.js
+7
-7
spec/frontend/ci_variable_list/store/getters_spec.js
spec/frontend/ci_variable_list/store/getters_spec.js
+1
-1
spec/frontend/ci_variable_list/store/mutations_spec.js
spec/frontend/ci_variable_list/store/mutations_spec.js
+1
-1
No files found.
app/assets/javascripts/pages/projects/environments/index/index.js
View file @
bc83b303
import
initEnviroments
from
'
~/environments/
'
;
import
initEnviro
n
ments
from
'
~/environments/
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initEnviroments
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initEnviro
n
ments
);
spec/frontend/ci_variable_list/components/ci_enviroments_dropdown_spec.js
→
spec/frontend/ci_variable_list/components/ci_enviro
n
ments_dropdown_spec.js
View file @
bc83b303
...
...
@@ -35,12 +35,12 @@ describe('Ci environments dropdown', () => {
wrapper
=
null
;
});
describe
(
'
No enviroments found
'
,
()
=>
{
describe
(
'
No enviro
n
ments found
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
(
'
stable
'
);
});
it
(
'
renders create button with search term if enviroments do not contain search term
'
,
()
=>
{
it
(
'
renders create button with search term if enviro
n
ments do not contain search term
'
,
()
=>
{
expect
(
findAllDropdownItems
()).
toHaveLength
(
2
);
expect
(
findDropdownItemByIndex
(
1
).
text
()).
toBe
(
'
Create wildcard: stable
'
);
});
...
...
@@ -55,7 +55,7 @@ describe('Ci environments dropdown', () => {
createComponent
(
''
);
});
it
(
'
renders all enviroments when search term is empty
'
,
()
=>
{
it
(
'
renders all enviro
n
ments when search term is empty
'
,
()
=>
{
expect
(
findAllDropdownItems
()).
toHaveLength
(
3
);
expect
(
findDropdownItemByIndex
(
0
).
text
()).
toBe
(
'
dev
'
);
expect
(
findDropdownItemByIndex
(
1
).
text
()).
toBe
(
'
prod
'
);
...
...
@@ -67,19 +67,19 @@ describe('Ci environments dropdown', () => {
});
});
describe
(
'
Enviroments found
'
,
()
=>
{
describe
(
'
Enviro
n
ments found
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
(
'
prod
'
);
});
it
(
'
renders only the enviroment searched for
'
,
()
=>
{
it
(
'
renders only the enviro
n
ment searched for
'
,
()
=>
{
expect
(
findAllDropdownItems
()).
toHaveLength
(
1
);
expect
(
findDropdownItemByIndex
(
0
).
text
()).
toBe
(
'
prod
'
);
});
it
(
'
should not display create button
'
,
()
=>
{
const
enviroments
=
findAllDropdownItems
().
filter
(
env
=>
env
.
text
().
startsWith
(
'
Create
'
));
expect
(
enviroments
).
toHaveLength
(
0
);
const
enviro
n
ments
=
findAllDropdownItems
().
filter
(
env
=>
env
.
text
().
startsWith
(
'
Create
'
));
expect
(
enviro
n
ments
).
toHaveLength
(
0
);
expect
(
findAllDropdownItems
()).
toHaveLength
(
1
);
});
...
...
spec/frontend/ci_variable_list/store/getters_spec.js
View file @
bc83b303
...
...
@@ -3,7 +3,7 @@ import mockData from '../services/mock_data';
describe
(
'
Ci variable getters
'
,
()
=>
{
describe
(
'
joinedEnvironments
'
,
()
=>
{
it
(
'
should join fetched enviroments with variable environment scopes
'
,
()
=>
{
it
(
'
should join fetched enviro
n
ments with variable environment scopes
'
,
()
=>
{
const
state
=
{
environments
:
[
'
All (default)
'
,
'
staging
'
,
'
deployment
'
,
'
prod
'
],
variables
:
mockData
.
mockVariableScopes
,
...
...
spec/frontend/ci_variable_list/store/mutations_spec.js
View file @
bc83b303
...
...
@@ -73,7 +73,7 @@ describe('CI variable list mutations', () => {
});
describe
(
'
ADD_WILD_CARD_SCOPE
'
,
()
=>
{
it
(
'
should add wild card scope to enviroments array and sort
'
,
()
=>
{
it
(
'
should add wild card scope to enviro
n
ments array and sort
'
,
()
=>
{
stateCopy
.
environments
=
[
'
dev
'
,
'
staging
'
];
mutations
[
types
.
ADD_WILD_CARD_SCOPE
](
stateCopy
,
'
production
'
);
...
...
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