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
6722462e
Commit
6722462e
authored
Mar 12, 2021
by
Jannik Lehmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhanced Specs
parent
2cc869a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
...d/vue_shared/components/user_popover/user_popover_spec.js
+7
-1
No files found.
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
View file @
6722462e
...
@@ -34,6 +34,7 @@ describe('User Popover Component', () => {
...
@@ -34,6 +34,7 @@ describe('User Popover Component', () => {
const
findUserStatus
=
()
=>
wrapper
.
find
(
'
.js-user-status
'
);
const
findUserStatus
=
()
=>
wrapper
.
find
(
'
.js-user-status
'
);
const
findTarget
=
()
=>
document
.
querySelector
(
'
.js-user-link
'
);
const
findTarget
=
()
=>
document
.
querySelector
(
'
.js-user-link
'
);
const
findUserName
=
()
=>
wrapper
.
find
(
UserNameWithStatus
);
const
findUserName
=
()
=>
wrapper
.
find
(
UserNameWithStatus
);
const
findSecurityBotDocsLink
=
()
=>
findByTestId
(
'
user-popover-bot-docs-link
'
);
const
createWrapper
=
(
props
=
{},
options
=
{})
=>
{
const
createWrapper
=
(
props
=
{},
options
=
{})
=>
{
wrapper
=
shallowMount
(
UserPopover
,
{
wrapper
=
shallowMount
(
UserPopover
,
{
...
@@ -83,6 +84,12 @@ describe('User Popover Component', () => {
...
@@ -83,6 +84,12 @@ describe('User Popover Component', () => {
expect
(
iconEl
.
props
(
'
name
'
)).
toEqual
(
'
location
'
);
expect
(
iconEl
.
props
(
'
name
'
)).
toEqual
(
'
location
'
);
});
});
it
(
"
should not show a link to bot's documentation
"
,
()
=>
{
createWrapper
();
const
securityBotDocsLink
=
findSecurityBotDocsLink
();
expect
(
securityBotDocsLink
.
exists
()).
toBe
(
false
);
});
});
});
describe
(
'
job data
'
,
()
=>
{
describe
(
'
job data
'
,
()
=>
{
...
@@ -235,7 +242,6 @@ describe('User Popover Component', () => {
...
@@ -235,7 +242,6 @@ describe('User Popover Component', () => {
websiteUrl
:
'
/security/bot/docs
'
,
websiteUrl
:
'
/security/bot/docs
'
,
bot
:
true
,
bot
:
true
,
};
};
const
findSecurityBotDocsLink
=
()
=>
findByTestId
(
'
user-popover-bot-docs-link
'
);
it
(
"
shows a link to the bot's documentation
"
,
()
=>
{
it
(
"
shows a link to the bot's documentation
"
,
()
=>
{
createWrapper
({
user
:
SECURITY_BOT_USER
});
createWrapper
({
user
:
SECURITY_BOT_USER
});
...
...
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