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
f779a43b
Commit
f779a43b
authored
Jun 14, 2021
by
Samantha Ming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to BlobEdit for consistency
parent
a51649bd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
app/assets/javascripts/repository/components/blob_content_viewer.vue
...javascripts/repository/components/blob_content_viewer.vue
+3
-6
app/assets/javascripts/repository/components/blob_edit.vue
app/assets/javascripts/repository/components/blob_edit.vue
+0
-0
spec/frontend/repository/components/blob_content_viewer_spec.js
...rontend/repository/components/blob_content_viewer_spec.js
+4
-4
spec/frontend/repository/components/blob_edit_spec.js
spec/frontend/repository/components/blob_edit_spec.js
+3
-3
No files found.
app/assets/javascripts/repository/components/blob_content_viewer.vue
View file @
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
Blob
HeaderEdit
from
'
./blob_header
_edit.vue
'
;
import
Blob
Edit
from
'
./blob
_edit.vue
'
;
import
BlobReplace
from
'
./blob_replace.vue
'
;
export
default
{
components
:
{
BlobHeader
,
Blob
Header
Edit
,
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"
...
...
app/assets/javascripts/repository/components/blob_
header_
edit.vue
→
app/assets/javascripts/repository/components/blob_edit.vue
View file @
f779a43b
File moved
spec/frontend/repository/components/blob_content_viewer_spec.js
View file @
f779a43b
...
...
@@ -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
Blob
HeaderEdit
from
'
~/repository/components/blob_header
_edit.vue
'
;
import
Blob
Edit
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
findBlob
HeaderEdit
=
()
=>
wrapper
.
findComponent
(
BlobHeader
Edit
);
const
findBlob
Edit
=
()
=>
wrapper
.
findComponent
(
Blob
Edit
);
const
findBlobContent
=
()
=>
wrapper
.
findComponent
(
BlobContent
);
const
findBlobReplace
=
()
=>
wrapper
.
findComponent
(
BlobReplace
);
...
...
@@ -177,7 +177,7 @@ describe('Blob content viewer component', () => {
await
nextTick
();
expect
(
findBlob
Header
Edit
().
props
()).
toMatchObject
({
expect
(
findBlobEdit
().
props
()).
toMatchObject
({
editPath
:
editBlobPath
,
webIdePath
:
ideEditPath
,
});
...
...
@@ -194,7 +194,7 @@ describe('Blob content viewer component', () => {
await
nextTick
();
expect
(
findBlob
Header
Edit
().
props
()).
toMatchObject
({
expect
(
findBlobEdit
().
props
()).
toMatchObject
({
editPath
:
editBlobPath
,
webIdePath
:
ideEditPath
,
});
...
...
spec/frontend/repository/components/blob_
header_
edit_spec.js
→
spec/frontend/repository/components/blob_edit_spec.js
View file @
f779a43b
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Blob
HeaderEdit
from
'
~/repository/components/blob_header
_edit.vue
'
;
import
Blob
Edit
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
(
'
Blob
Header
Edit component
'
,
()
=>
{
describe
(
'
BlobEdit component
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
(
consolidatedEditButton
=
false
,
props
=
{})
=>
{
wrapper
=
shallowMount
(
Blob
Header
Edit
,
{
wrapper
=
shallowMount
(
BlobEdit
,
{
propsData
:
{
...
DEFAULT_PROPS
,
...
props
,
...
...
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