Commit 5a27361c authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '229584-jira-issues-ui-polish' into 'master'

Polish Jira issues integration UI

See merge request gitlab-org/gitlab!37095
parents a73192b9 8809ebed
...@@ -272,12 +272,11 @@ export default { ...@@ -272,12 +272,11 @@ export default {
:target="linkTarget" :target="linkTarget"
data-testid="issuable-title" data-testid="issuable-title"
data-qa-selector="issue_link" data-qa-selector="issue_link"
> >{{ issuable.title
{{ issuable.title }} }}<gl-icon
<gl-icon
v-if="isJiraIssue" v-if="isJiraIssue"
name="external-link" name="external-link"
class="gl-vertical-align-text-bottom" class="gl-vertical-align-text-bottom gl-ml-2"
/> />
</gl-link> </gl-link>
</span> </span>
......
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
return { return {
initialRender: true, initialRender: true,
recentSearchesPromise: null, recentSearchesPromise: null,
recentSearches: [], recentSearches: null,
filterValue: this.initialFilterValue, filterValue: this.initialFilterValue,
selectedSortOption, selectedSortOption,
selectedSortDirection, selectedSortDirection,
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
> >
<span class="js-assignee-tooltip"> <span class="js-assignee-tooltip">
<span class="bold d-block">{{ __('Assignee') }}</span> {{ assignee.name }} <span class="bold d-block">{{ __('Assignee') }}</span> {{ assignee.name }}
<span class="text-white-50">@{{ assignee.username }}</span> <span v-if="assignee.username" class="text-white-50">@{{ assignee.username }}</span>
</span> </span>
</user-avatar-link> </user-avatar-link>
<span <span
......
---
title: Polish Jira issues UI
merge_request: 37095
author:
type: changed
...@@ -21,6 +21,11 @@ describe('IssueAssigneesComponent', () => { ...@@ -21,6 +21,11 @@ describe('IssueAssigneesComponent', () => {
vm = wrapper.vm; vm = wrapper.vm;
}; };
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
const findTooltipText = () => wrapper.find('.js-assignee-tooltip').text(); const findTooltipText = () => wrapper.find('.js-assignee-tooltip').text();
const findAvatars = () => wrapper.findAll(UserAvatarLink); const findAvatars = () => wrapper.findAll(UserAvatarLink);
const findOverflowCounter = () => wrapper.find('.avatar-counter'); const findOverflowCounter = () => wrapper.find('.avatar-counter');
...@@ -123,6 +128,22 @@ describe('IssueAssigneesComponent', () => { ...@@ -123,6 +128,22 @@ describe('IssueAssigneesComponent', () => {
it('renders assignee @username', () => { it('renders assignee @username', () => {
expect(findTooltipText()).toContain('@monserrate.gleichner'); expect(findTooltipText()).toContain('@monserrate.gleichner');
}); });
it('does not render `@` when username not available', () => {
const userName = 'User without username';
factory({
assignees: [
{
name: userName,
},
],
});
const tooltipText = findTooltipText();
expect(tooltipText).toContain(userName);
expect(tooltipText).not.toContain('@');
});
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment