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
99d42aed
Commit
99d42aed
authored
May 04, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address maintainer feedback
- use toMatchObject to test props
parent
c4db61f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
ee/spec/frontend/integrations/jira/issues_list/components/jira_issues_list_root_spec.js
...jira/issues_list/components/jira_issues_list_root_spec.js
+11
-7
No files found.
ee/spec/frontend/integrations/jira/issues_list/components/jira_issues_list_root_spec.js
View file @
99d42aed
...
...
@@ -96,10 +96,12 @@ describe('JiraIssuesListRoot', () => {
const
issuableList
=
findIssuableList
();
const
issuablesProp
=
issuableList
.
props
(
'
issuables
'
);
expect
(
issuableList
.
props
(
'
currentPage
'
)).
toBe
(
resolvedValue
.
headers
[
'
x-page
'
]);
expect
(
issuableList
.
props
(
'
previousPage
'
)).
toBe
(
resolvedValue
.
headers
[
'
x-page
'
]
-
1
);
expect
(
issuableList
.
props
(
'
nextPage
'
)).
toBe
(
resolvedValue
.
headers
[
'
x-page
'
]
+
1
);
expect
(
issuableList
.
props
(
'
totalItems
'
)).
toBe
(
resolvedValue
.
headers
[
'
x-total
'
]);
expect
(
issuableList
.
props
()).
toMatchObject
({
currentPage
:
resolvedValue
.
headers
[
'
x-page
'
],
previousPage
:
resolvedValue
.
headers
[
'
x-page
'
]
-
1
,
nextPage
:
resolvedValue
.
headers
[
'
x-page
'
]
+
1
,
totalItems
:
resolvedValue
.
headers
[
'
x-total
'
],
});
expect
(
issuablesProp
).
toHaveLength
(
mockJiraIssues
.
length
);
const
firstIssue
=
convertObjectPropsToCamelCase
(
mockJiraIssues
[
0
],
{
deep
:
true
});
...
...
@@ -201,9 +203,11 @@ describe('JiraIssuesListRoot', () => {
with_labels_details
:
true
,
},
});
expect
(
issuableList
.
props
(
'
currentPage
'
)).
toBe
(
mockPage
);
expect
(
issuableList
.
props
(
'
previousPage
'
)).
toBe
(
mockPage
-
1
);
expect
(
issuableList
.
props
(
'
nextPage
'
)).
toBe
(
mockPage
+
1
);
expect
(
issuableList
.
props
()).
toMatchObject
({
currentPage
:
mockPage
,
previousPage
:
mockPage
-
1
,
nextPage
:
mockPage
+
1
,
});
});
it
(
'
"sort" event executes GET request correctly
'
,
async
()
=>
{
...
...
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