Commit da34b9fc authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'rename-blob-header-components' into 'master'

Rename blob edit component for better consistency

See merge request gitlab-org/gitlab!64036
parents 9c9d745a f779a43b
......@@ -7,13 +7,13 @@ import { SIMPLE_BLOB_VIEWER, RICH_BLOB_VIEWER } from '~/blob/components/constant
import createFlash from '~/flash';
import { __ } from '~/locale';
import blobInfoQuery from '../queries/blob_info.query.graphql';
import BlobHeaderEdit from './blob_header_edit.vue';
import BlobEdit from './blob_edit.vue';
import BlobReplace from './blob_replace.vue';
export default {
components: {
BlobHeader,
BlobHeaderEdit,
BlobEdit,
BlobReplace,
BlobContent,
GlLoadingIcon,
......@@ -131,10 +131,7 @@ export default {
@viewer-changed="switchViewer"
>
<template #actions>
<blob-header-edit
:edit-path="blobInfo.editBlobPath"
:web-ide-path="blobInfo.ideEditPath"
/>
<blob-edit :edit-path="blobInfo.editBlobPath" :web-ide-path="blobInfo.ideEditPath" />
<blob-replace
v-if="isLoggedIn"
:path="path"
......
......@@ -4,7 +4,7 @@ import { nextTick } from 'vue';
import BlobContent from '~/blob/components/blob_content.vue';
import BlobHeader from '~/blob/components/blob_header.vue';
import BlobContentViewer from '~/repository/components/blob_content_viewer.vue';
import BlobHeaderEdit from '~/repository/components/blob_header_edit.vue';
import BlobEdit from '~/repository/components/blob_edit.vue';
import BlobReplace from '~/repository/components/blob_replace.vue';
let wrapper;
......@@ -78,7 +78,7 @@ const fullFactory = createFactory(mount);
describe('Blob content viewer component', () => {
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const findBlobHeader = () => wrapper.findComponent(BlobHeader);
const findBlobHeaderEdit = () => wrapper.findComponent(BlobHeaderEdit);
const findBlobEdit = () => wrapper.findComponent(BlobEdit);
const findBlobContent = () => wrapper.findComponent(BlobContent);
const findBlobReplace = () => wrapper.findComponent(BlobReplace);
......@@ -177,7 +177,7 @@ describe('Blob content viewer component', () => {
await nextTick();
expect(findBlobHeaderEdit().props()).toMatchObject({
expect(findBlobEdit().props()).toMatchObject({
editPath: editBlobPath,
webIdePath: ideEditPath,
});
......@@ -194,7 +194,7 @@ describe('Blob content viewer component', () => {
await nextTick();
expect(findBlobHeaderEdit().props()).toMatchObject({
expect(findBlobEdit().props()).toMatchObject({
editPath: editBlobPath,
webIdePath: ideEditPath,
});
......
import { GlButton } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import BlobHeaderEdit from '~/repository/components/blob_header_edit.vue';
import BlobEdit from '~/repository/components/blob_edit.vue';
import WebIdeLink from '~/vue_shared/components/web_ide_link.vue';
const DEFAULT_PROPS = {
......@@ -8,11 +8,11 @@ const DEFAULT_PROPS = {
webIdePath: 'some_file.js/ide/edit',
};
describe('BlobHeaderEdit component', () => {
describe('BlobEdit component', () => {
let wrapper;
const createComponent = (consolidatedEditButton = false, props = {}) => {
wrapper = shallowMount(BlobHeaderEdit, {
wrapper = shallowMount(BlobEdit, {
propsData: {
...DEFAULT_PROPS,
...props,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment