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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
9bf293a2
Commit
9bf293a2
authored
May 17, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix variable list karma specs
parent
abe3e1cf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
spec/javascripts/behaviors/secret_values_spec.js
spec/javascripts/behaviors/secret_values_spec.js
+18
-18
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
+1
-1
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
+1
-1
No files found.
spec/javascripts/behaviors/secret_values_spec.js
View file @
9bf293a2
...
...
@@ -77,9 +77,9 @@ describe('setupSecretValues', () => {
const
placeholders
=
wrapper
.
querySelectorAll
(
'
.js-secret-value-placeholder
'
);
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
it
(
'
should toggle value and placeholder
'
,
()
=>
{
...
...
@@ -91,16 +91,16 @@ describe('setupSecretValues', () => {
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
});
...
...
@@ -128,11 +128,11 @@ describe('setupSecretValues', () => {
expect
(
values
.
length
).
toEqual
(
3
);
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
});
expect
(
placeholders
.
length
).
toEqual
(
3
);
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
});
...
...
@@ -146,22 +146,22 @@ describe('setupSecretValues', () => {
expect
(
values
.
length
).
toEqual
(
3
);
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
expect
(
placeholders
.
length
).
toEqual
(
3
);
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
});
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
3
);
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
});
expect
(
placeholders
.
length
).
toEqual
(
3
);
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
});
});
...
...
@@ -182,22 +182,22 @@ describe('setupSecretValues', () => {
expect
(
values
.
length
).
toEqual
(
4
);
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
expect
(
placeholders
.
length
).
toEqual
(
4
);
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
});
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
4
);
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
});
expect
(
placeholders
.
length
).
toEqual
(
4
);
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
});
});
});
...
...
@@ -220,9 +220,9 @@ describe('setupSecretValues', () => {
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
});
});
});
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
View file @
9bf293a2
...
...
@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils';
import
AjaxFormVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
const
VARIABLE_PATCH_ENDPOINT
=
'
http://test.host/frontend-fixtures/builds-project/variables
'
;
const
HIDE_CLASS
=
'
hid
den
'
;
const
HIDE_CLASS
=
'
hid
e
'
;
describe
(
'
AjaxFormVariableList
'
,
()
=>
{
preloadFixtures
(
'
projects/ci_cd_settings.html.raw
'
);
...
...
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
View file @
9bf293a2
...
...
@@ -2,7 +2,7 @@ import $ from 'jquery';
import
VariableList
from
'
~/ci_variable_list/ci_variable_list
'
;
import
getSetTimeoutPromise
from
'
spec/helpers/set_timeout_promise_helper
'
;
const
HIDE_CLASS
=
'
hid
den
'
;
const
HIDE_CLASS
=
'
hid
e
'
;
describe
(
'
VariableList
'
,
()
=>
{
preloadFixtures
(
'
pipeline_schedules/edit.html.raw
'
);
...
...
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