summaryrefslogtreecommitdiff
path: root/spec/frontend
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 12:08:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 12:08:18 +0000
commit684d65316ac77c62f47d68b9926eea8af30db227 (patch)
treed1f4c4eec399d7772ab4ad6294f98e7505c1cee5 /spec/frontend
parentade18c9d68d5a2e6c6e28ef7e9d3add3b3491ace (diff)
downloadgitlab-ce-684d65316ac77c62f47d68b9926eea8af30db227.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/diffs/components/commit_item_spec.js25
1 files changed, 10 insertions, 15 deletions
diff --git a/spec/frontend/diffs/components/commit_item_spec.js b/spec/frontend/diffs/components/commit_item_spec.js
index 61bab77964e..6bb3a0dcf21 100644
--- a/spec/frontend/diffs/components/commit_item_spec.js
+++ b/spec/frontend/diffs/components/commit_item_spec.js
@@ -30,12 +30,12 @@ describe('diffs/components/commit_item', () => {
const getCommitActionsElement = () => wrapper.find('.commit-actions');
const getCommitPipelineStatus = () => wrapper.find(CommitPipelineStatus);
- const defaultProps = {
- commit: getDiffWithCommit().commit,
- };
- const mountComponent = (propsData = defaultProps) => {
+ const mountComponent = propsData => {
wrapper = mount(Component, {
- propsData,
+ propsData: {
+ commit,
+ ...propsData,
+ },
stubs: {
CommitPipelineStatus: true,
},
@@ -59,9 +59,7 @@ describe('diffs/components/commit_item', () => {
expect(titleElement.text()).toBe(commit.title_html);
});
- // https://gitlab.com/gitlab-org/gitlab/-/issues/209776
- // eslint-disable-next-line jest/no-disabled-tests
- it.skip('renders commit description', () => {
+ it('renders commit description', () => {
const descElement = getDescElement();
const descExpandElement = getDescExpandElement();
@@ -107,7 +105,7 @@ describe('diffs/components/commit_item', () => {
describe('without commit description', () => {
beforeEach(() => {
- mountComponent({ defaultProps, commit: { ...defaultProps.commit, description_html: '' } });
+ mountComponent({ commit: { ...commit, description_html: '' } });
});
it('hides description', () => {
@@ -122,9 +120,8 @@ describe('diffs/components/commit_item', () => {
describe('with no matching user', () => {
beforeEach(() => {
mountComponent({
- defaultProps,
commit: {
- ...defaultProps.commit,
+ ...commit,
author: null,
author_email: TEST_AUTHOR_EMAIL,
author_name: TEST_AUTHOR_NAME,
@@ -154,8 +151,7 @@ describe('diffs/components/commit_item', () => {
describe('with signature', () => {
beforeEach(() => {
mountComponent({
- defaultProps,
- commit: { ...defaultProps.commit, signature_html: TEST_SIGNATURE_HTML },
+ commit: { ...commit, signature_html: TEST_SIGNATURE_HTML },
});
});
@@ -169,8 +165,7 @@ describe('diffs/components/commit_item', () => {
describe('with pipeline status', () => {
beforeEach(() => {
mountComponent({
- defaultProps,
- commit: { ...defaultProps.commit, pipeline_status_path: TEST_PIPELINE_STATUS_PATH },
+ commit: { ...commit, pipeline_status_path: TEST_PIPELINE_STATUS_PATH },
});
});