diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /spec/frontend/snippets/components/snippet_blob_edit_spec.js | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/frontend/snippets/components/snippet_blob_edit_spec.js')
-rw-r--r-- | spec/frontend/snippets/components/snippet_blob_edit_spec.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/frontend/snippets/components/snippet_blob_edit_spec.js b/spec/frontend/snippets/components/snippet_blob_edit_spec.js index fc4da46d722..9d0311fd682 100644 --- a/spec/frontend/snippets/components/snippet_blob_edit_spec.js +++ b/spec/frontend/snippets/components/snippet_blob_edit_spec.js @@ -5,7 +5,7 @@ import waitForPromises from 'helpers/wait_for_promises'; import { TEST_HOST } from 'helpers/test_constants'; import SnippetBlobEdit from '~/snippets/components/snippet_blob_edit.vue'; import BlobHeaderEdit from '~/blob/components/blob_edit_header.vue'; -import BlobContentEdit from '~/blob/components/blob_edit_content.vue'; +import EditorLite from '~/vue_shared/components/editor_lite.vue'; import axios from '~/lib/utils/axios_utils'; import { joinPaths } from '~/lib/utils/url_utility'; import { deprecatedCreateFlash as createFlash } from '~/flash'; @@ -48,7 +48,7 @@ describe('Snippet Blob Edit component', () => { const findLoadingIcon = () => wrapper.find(GlLoadingIcon); const findHeader = () => wrapper.find(BlobHeaderEdit); - const findContent = () => wrapper.find(BlobContentEdit); + const findContent = () => wrapper.find(EditorLite); const getLastUpdatedArgs = () => { const event = wrapper.emitted()['blob-updated']; @@ -156,7 +156,7 @@ describe('Snippet Blob Edit component', () => { }); it('shows blob header', () => { - const { canDelete = true, showDelete = false } = props; + const { canDelete = true, showDelete = true } = props; expect(findHeader().props()).toMatchObject({ canDelete, @@ -172,11 +172,13 @@ describe('Snippet Blob Edit component', () => { expect(findContent().exists()).toBe(showContent); if (showContent) { - expect(findContent().props()).toEqual({ - value: TEST_BLOB_LOADED.content, - fileGlobalId: TEST_BLOB_LOADED.id, - fileName: TEST_BLOB_LOADED.path, - }); + expect(findContent().props()).toEqual( + expect.objectContaining({ + value: TEST_BLOB_LOADED.content, + fileGlobalId: TEST_BLOB_LOADED.id, + fileName: TEST_BLOB_LOADED.path, + }), + ); } }); }); |