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
6f31efaf
Commit
6f31efaf
authored
Mar 01, 2021
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for collapsed sidebar
Clean up sidebar specs to be more consistent
parent
fb8b7c25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
ee/app/assets/javascripts/integrations/jira/issues_show/components/sidebar/issue_due_date.vue
...ns/jira/issues_show/components/sidebar/issue_due_date.vue
+5
-1
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/issue_due_date_spec.js
...ira/issues_show/components/sidebar/issue_due_date_spec.js
+4
-0
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root_spec.js
..._show/components/sidebar/jira_issues_sidebar_root_spec.js
+3
-6
No files found.
ee/app/assets/javascripts/integrations/jira/issues_show/components/sidebar/issue_due_date.vue
View file @
6f31efaf
...
...
@@ -55,7 +55,11 @@ export default {
<
template
>
<div
class=
"block"
>
<div
v-gl-tooltip.html=
"dueDateTooltipProps"
class=
"sidebar-collapsed-icon"
>
<div
v-gl-tooltip.html=
"dueDateTooltipProps"
class=
"sidebar-collapsed-icon"
data-testid=
"due-date-collapsed"
>
<gl-icon
name=
"calendar"
/>
<span
v-if=
"dueDate"
>
{{
dueDateInWords
}}
</span>
<span
v-else
>
{{
$options
.
i18n
.
none
}}
</span>
...
...
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/issue_due_date_spec.js
View file @
6f31efaf
...
...
@@ -23,12 +23,14 @@ describe('IssueDueDate', () => {
}
});
const
findDueDateCollapsed
=
()
=>
wrapper
.
findByTestId
(
'
due-date-collapsed
'
);
const
findDueDateValue
=
()
=>
wrapper
.
findByTestId
(
'
due-date-value
'
);
describe
(
'
when dueDate is null
'
,
()
=>
{
it
(
'
renders "None" as value
'
,
()
=>
{
createComponent
();
expect
(
findDueDateCollapsed
().
text
()).
toBe
(
'
None
'
);
expect
(
findDueDateValue
().
text
()).
toBe
(
'
None
'
);
});
});
...
...
@@ -45,6 +47,7 @@ describe('IssueDueDate', () => {
},
});
expect
(
findDueDateCollapsed
().
text
()).
toBe
(
'
Feb 14, 2021
'
);
expect
(
findDueDateValue
().
text
()).
toBe
(
'
Feb 14, 2021 (Past due)
'
);
});
});
...
...
@@ -61,6 +64,7 @@ describe('IssueDueDate', () => {
},
});
expect
(
findDueDateCollapsed
().
text
()).
toBe
(
'
Feb 14, 2021
'
);
expect
(
findDueDateValue
().
text
()).
toBe
(
'
Feb 14, 2021
'
);
});
});
...
...
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root_spec.js
View file @
6f31efaf
...
...
@@ -38,24 +38,21 @@ describe('JiraIssuesSidebar', () => {
it
(
'
renders Labels block
'
,
()
=>
{
createComponent
();
expect
(
findLabelsSelect
().
exists
()).
toBe
(
true
);
expect
(
findLabelsSelect
().
props
(
'
selectedLabels
'
)).
toEqual
(
mockJiraIssue
.
labels
);
expect
(
findLabelsSelect
().
props
(
'
selectedLabels
'
)).
toBe
(
mockJiraIssue
.
labels
);
});
it
(
'
renders Assignee block
'
,
()
=>
{
createComponent
();
const
assignee
=
findAssignee
();
expect
(
assignee
.
exists
()).
toBe
(
true
);
expect
(
assignee
.
props
(
'
assignee
'
)).
toEqual
(
mockJiraIssue
.
assignees
[
0
]);
expect
(
assignee
.
props
(
'
assignee
'
)).
toBe
(
mockJiraIssue
.
assignees
[
0
]);
});
it
(
'
renders IssueDueDate
'
,
()
=>
{
createComponent
();
const
dueDate
=
findIssueDueDate
();
expect
(
dueDate
.
exists
()).
toBe
(
true
);
expect
(
dueDate
.
props
(
'
dueDate
'
)).
toEqual
(
mockJiraIssue
.
dueDate
);
expect
(
dueDate
.
props
(
'
dueDate
'
)).
toBe
(
mockJiraIssue
.
dueDate
);
});
describe
(
'
when references.relative is null
'
,
()
=>
{
...
...
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