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
d8191a7b
Commit
d8191a7b
authored
Jun 15, 2020
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find an element by ref
parent
a88cca1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
ee/app/assets/javascripts/vue_shared/components/epic/epic_warning.vue
...s/javascripts/vue_shared/components/epic/epic_warning.vue
+1
-1
ee/spec/frontend/vue_shared/components/epic/epic_warning_spec.js
.../frontend/vue_shared/components/epic/epic_warning_spec.js
+6
-2
No files found.
ee/app/assets/javascripts/vue_shared/components/epic/epic_warning.vue
View file @
d8191a7b
...
...
@@ -28,7 +28,7 @@ export default {
</
script
>
<
template
>
<div
v-if=
"isNoteableTypeEpic && isConfidential"
class=
"issuable-note-warning"
>
<div
v-if=
"isNoteableTypeEpic && isConfidential"
ref=
"epicWarning"
class=
"issuable-note-warning"
>
<gl-icon
name=
"eye-slash"
:size=
"16"
class=
"icon"
/>
<span
ref=
"confidential"
>
{{
__
(
'
This is a confidential epic.
'
)
}}
...
...
ee/spec/frontend/vue_shared/components/epic/epic_warning_spec.js
View file @
d8191a7b
...
...
@@ -8,6 +8,7 @@ describe('Epic Warning Component', () => {
const
findIcon
=
()
=>
wrapper
.
find
(
GlIcon
);
const
findConfidentialBlock
=
()
=>
wrapper
.
find
({
ref
:
'
confidential
'
});
const
findEpicWarning
=
()
=>
wrapper
.
find
({
ref
:
'
epicWarning
'
});
const
createComponent
=
(
props
,
isNoteableEpic
=
true
)
=>
{
wrapper
=
shallowMount
(
EpicWarning
,
{
...
...
@@ -60,9 +61,12 @@ describe('Epic Warning Component', () => {
});
describe
(
'
when noteable type is not epic
'
,
()
=>
{
it
(
'
does not render itself
'
,
()
=>
{
beforeEach
(
()
=>
{
createComponent
({
isConfidential
:
true
},
false
);
expect
(
wrapper
.
find
(
'
.issuable-note-warning
'
).
exists
()).
toBe
(
false
);
});
it
(
'
does not render itself
'
,
()
=>
{
expect
(
findEpicWarning
().
exists
()).
toBe
(
false
);
});
});
});
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