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
dcb61727
Commit
dcb61727
authored
Nov 30, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address reviewer feedback
parent
7cfd6d20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue
...ripts/jira_connect/subscriptions/components/user_link.vue
+3
-14
spec/frontend/jira_connect/subscriptions/components/user_link_spec.js
...d/jira_connect/subscriptions/components/user_link_spec.js
+4
-4
No files found.
app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue
View file @
dcb61727
...
...
@@ -36,13 +36,8 @@ export default {
return
`
${
gon
.
gitlab_url
}
/
${
gon
.
current_username
}
`
;
},
},
created
()
{
this
.
setSignInURL
();
},
methods
:
{
async
setSignInURL
()
{
this
.
signInURL
=
await
getGitlabSignInURL
(
this
.
usersPath
);
},
async
created
()
{
this
.
signInURL
=
await
getGitlabSignInURL
(
this
.
usersPath
);
},
i18n
:
{
signInText
:
__
(
'
Sign in to GitLab
'
),
...
...
@@ -54,12 +49,7 @@ export default {
<div
class=
"jira-connect-user gl-font-base"
>
<gl-sprintf
v-if=
"userSignedIn"
:message=
"$options.i18n.signedInAsUserText"
>
<template
#user_link
>
<gl-link
data-testid=
"gitlab-user-link"
:href=
"gitlabUserLink"
rel=
"noopener noreferrer"
target=
"_blank"
>
<gl-link
data-testid=
"gitlab-user-link"
:href=
"gitlabUserLink"
target=
"_blank"
>
{{
gitlabUserHandle
}}
</gl-link>
</
template
>
...
...
@@ -69,7 +59,6 @@ export default {
v-else-if=
"hasSubscriptions"
data-testid=
"sign-in-link"
:href=
"signInURL"
rel=
"noopener noreferrer"
target=
"_blank"
>
{{ $options.i18n.signInText }}
...
...
spec/frontend/jira_connect/subscriptions/components/user_link_spec.js
View file @
dcb61727
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
UserLink
from
'
~/jira_connect/subscriptions/components/user_link.vue
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
jest
.
mock
(
'
~/jira_connect/subscriptions/utils
'
,
()
=>
({
...
...
@@ -11,7 +11,7 @@ describe('SubscriptionsList', () => {
let
wrapper
;
const
createComponent
=
(
propsData
=
{},
{
provide
}
=
{})
=>
{
wrapper
=
shallowMount
(
UserLink
,
{
wrapper
=
shallowMount
Extended
(
UserLink
,
{
propsData
,
provide
,
stubs
:
{
...
...
@@ -20,8 +20,8 @@ describe('SubscriptionsList', () => {
});
};
const
findSignInLink
=
()
=>
wrapper
.
find
(
'
[data-testid="sign-in-link"]
'
);
const
findGitlabUserLink
=
()
=>
wrapper
.
find
(
'
[data-testid="gitlab-user-link"]
'
);
const
findSignInLink
=
()
=>
wrapper
.
find
ByTestId
(
'
sign-in-link
'
);
const
findGitlabUserLink
=
()
=>
wrapper
.
find
ByTestId
(
'
gitlab-user-link
'
);
const
findSprintf
=
()
=>
wrapper
.
findComponent
(
GlSprintf
);
afterEach
(()
=>
{
...
...
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