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
d55b7466
Commit
d55b7466
authored
Aug 04, 2020
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix toggle_button spec
parent
90e66900
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
app/assets/javascripts/vue_shared/components/toggle_button.vue
...ssets/javascripts/vue_shared/components/toggle_button.vue
+4
-5
spec/frontend/vue_shared/components/toggle_button_spec.js
spec/frontend/vue_shared/components/toggle_button_spec.js
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/toggle_button.vue
View file @
d55b7466
<
script
>
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
../../locale
'
;
import
Icon
from
'
./icon.vue
'
;
const
ICON_ON
=
'
status_success_borderless
'
;
const
ICON_OFF
=
'
status_failed_borderless
'
;
...
...
@@ -10,7 +9,7 @@ const LABEL_OFF = s__('ToggleButton|Toggle Status: OFF');
export
default
{
components
:
{
Icon
,
Gl
Icon
,
GlLoadingIcon
,
},
...
...
@@ -78,8 +77,8 @@ export default {
>
<gl-loading-icon
class=
"loading-icon"
/>
<span
class=
"toggle-icon gl-bg-white"
>
<icon
:size=
"1
8
"
<
gl-
icon
:size=
"1
6
"
:name=
"toggleIcon"
:class=
"value ? 'gl-fill-blue-500' : 'gl-fill-gray-400'"
/>
...
...
spec/frontend/vue_shared/components/toggle_button_spec.js
View file @
d55b7466
...
...
@@ -32,7 +32,7 @@ describe('Toggle Button', () => {
it
(
'
renders input status icon
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelectorAll
(
'
span.toggle-icon
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
svg.s16
.toggle-icon-svg
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
svg.s16
'
).
length
).
toEqual
(
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