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
8c0bcc51
Commit
8c0bcc51
authored
Mar 11, 2020
by
Nicolò Maria Mezzopera
Committed by
Nicolò Maria Mezzopera
Apr 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix transient failure in commit_item_spec
only load mockData once
parent
652b09e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
spec/frontend/diffs/components/commit_item_spec.js
spec/frontend/diffs/components/commit_item_spec.js
+10
-15
No files found.
spec/frontend/diffs/components/commit_item_spec.js
View file @
8c0bcc51
...
@@ -30,12 +30,12 @@ describe('diffs/components/commit_item', () => {
...
@@ -30,12 +30,12 @@ describe('diffs/components/commit_item', () => {
const
getCommitActionsElement
=
()
=>
wrapper
.
find
(
'
.commit-actions
'
);
const
getCommitActionsElement
=
()
=>
wrapper
.
find
(
'
.commit-actions
'
);
const
getCommitPipelineStatus
=
()
=>
wrapper
.
find
(
CommitPipelineStatus
);
const
getCommitPipelineStatus
=
()
=>
wrapper
.
find
(
CommitPipelineStatus
);
const
defaultProps
=
{
const
mountComponent
=
propsData
=>
{
commit
:
getDiffWithCommit
().
commit
,
};
const
mountComponent
=
(
propsData
=
defaultProps
)
=>
{
wrapper
=
mount
(
Component
,
{
wrapper
=
mount
(
Component
,
{
propsData
,
propsData
:
{
commit
,
...
propsData
,
},
stubs
:
{
stubs
:
{
CommitPipelineStatus
:
true
,
CommitPipelineStatus
:
true
,
},
},
...
@@ -59,9 +59,7 @@ describe('diffs/components/commit_item', () => {
...
@@ -59,9 +59,7 @@ describe('diffs/components/commit_item', () => {
expect
(
titleElement
.
text
()).
toBe
(
commit
.
title_html
);
expect
(
titleElement
.
text
()).
toBe
(
commit
.
title_html
);
});
});
// https://gitlab.com/gitlab-org/gitlab/-/issues/209776
it
(
'
renders commit description
'
,
()
=>
{
// eslint-disable-next-line jest/no-disabled-tests
it
.
skip
(
'
renders commit description
'
,
()
=>
{
const
descElement
=
getDescElement
();
const
descElement
=
getDescElement
();
const
descExpandElement
=
getDescExpandElement
();
const
descExpandElement
=
getDescExpandElement
();
...
@@ -107,7 +105,7 @@ describe('diffs/components/commit_item', () => {
...
@@ -107,7 +105,7 @@ describe('diffs/components/commit_item', () => {
describe
(
'
without commit description
'
,
()
=>
{
describe
(
'
without commit description
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mountComponent
({
defaultProps
,
commit
:
{
...
defaultProps
.
commit
,
description_html
:
''
}
});
mountComponent
({
commit
:
{
..
.
commit
,
description_html
:
''
}
});
});
});
it
(
'
hides description
'
,
()
=>
{
it
(
'
hides description
'
,
()
=>
{
...
@@ -122,9 +120,8 @@ describe('diffs/components/commit_item', () => {
...
@@ -122,9 +120,8 @@ describe('diffs/components/commit_item', () => {
describe
(
'
with no matching user
'
,
()
=>
{
describe
(
'
with no matching user
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mountComponent
({
mountComponent
({
defaultProps
,
commit
:
{
commit
:
{
...
defaultProps
.
commit
,
...
commit
,
author
:
null
,
author
:
null
,
author_email
:
TEST_AUTHOR_EMAIL
,
author_email
:
TEST_AUTHOR_EMAIL
,
author_name
:
TEST_AUTHOR_NAME
,
author_name
:
TEST_AUTHOR_NAME
,
...
@@ -154,8 +151,7 @@ describe('diffs/components/commit_item', () => {
...
@@ -154,8 +151,7 @@ describe('diffs/components/commit_item', () => {
describe
(
'
with signature
'
,
()
=>
{
describe
(
'
with signature
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mountComponent
({
mountComponent
({
defaultProps
,
commit
:
{
...
commit
,
signature_html
:
TEST_SIGNATURE_HTML
},
commit
:
{
...
defaultProps
.
commit
,
signature_html
:
TEST_SIGNATURE_HTML
},
});
});
});
});
...
@@ -169,8 +165,7 @@ describe('diffs/components/commit_item', () => {
...
@@ -169,8 +165,7 @@ describe('diffs/components/commit_item', () => {
describe
(
'
with pipeline status
'
,
()
=>
{
describe
(
'
with pipeline status
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mountComponent
({
mountComponent
({
defaultProps
,
commit
:
{
...
commit
,
pipeline_status_path
:
TEST_PIPELINE_STATUS_PATH
},
commit
:
{
...
defaultProps
.
commit
,
pipeline_status_path
:
TEST_PIPELINE_STATUS_PATH
},
});
});
});
});
...
...
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