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
332815d6
Commit
332815d6
authored
Aug 18, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Add/remove snippet files in the edit view
parent
6e7b56e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
app/assets/javascripts/blob/components/blob_edit_header.vue
app/assets/javascripts/blob/components/blob_edit_header.vue
+1
-1
app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
...scripts/snippets/components/snippet_blob_actions_edit.vue
+0
-2
spec/frontend/blob/components/blob_edit_header_spec.js
spec/frontend/blob/components/blob_edit_header_spec.js
+3
-3
spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js
...end/snippets/components/snippet_blob_actions_edit_spec.js
+3
-3
No files found.
app/assets/javascripts/blob/components/blob_edit_header.vue
View file @
332815d6
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
canDelete
:
{
canDelete
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
default
:
fals
e
,
default
:
tru
e
,
},
},
showDelete
:
{
showDelete
:
{
type
:
Boolean
,
type
:
Boolean
,
...
...
app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
View file @
332815d6
...
@@ -14,8 +14,6 @@ export default {
...
@@ -14,8 +14,6 @@ export default {
},
},
mixins
:
[
glFeatureFlagsMixin
()],
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
props
:
{
// TODO: Build reactivity for initBlobs.
// What happens if this changes (i.e. blobs are being loaded through pages)?
initBlobs
:
{
initBlobs
:
{
type
:
Array
,
type
:
Array
,
required
:
true
,
required
:
true
,
...
...
spec/frontend/blob/components/blob_edit_header_spec.js
View file @
332815d6
...
@@ -56,9 +56,9 @@ describe('Blob Header Editing', () => {
...
@@ -56,9 +56,9 @@ describe('Blob Header Editing', () => {
});
});
describe
.
each
`
describe
.
each
`
props | expectedDisabled
props
| expectedDisabled
${{
showDelete
:
true
}
}
|
${
tru
e
}
${{
showDelete
:
true
}
}
|
${
fals
e
}
${{
showDelete
:
true
,
canDelete
:
true
}
} |
${
fals
e
}
${{
showDelete
:
true
,
canDelete
:
false
}
} |
${
tru
e
}
`
(
'
with $props
'
,
({
props
,
expectedDisabled
})
=>
{
`
(
'
with $props
'
,
({
props
,
expectedDisabled
})
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponent
(
props
);
createComponent
(
props
);
...
...
spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js
View file @
332815d6
...
@@ -217,7 +217,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
...
@@ -217,7 +217,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
describe
(
'
with 1 blob
'
,
()
=>
{
describe
(
'
with 1 blob
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponent
({
initBlobs
:
[
createBlobFromTestEntry
(
testEntries
.
created
)]
,
isReady
:
true
});
createComponent
({
initBlobs
:
[
createBlobFromTestEntry
(
testEntries
.
created
)]
});
});
});
it
(
'
disables delete button
'
,
()
=>
{
it
(
'
disables delete button
'
,
()
=>
{
...
@@ -253,7 +253,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
...
@@ -253,7 +253,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
describe
(
'
with 0 init blob
'
,
()
=>
{
describe
(
'
with 0 init blob
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponent
({
initBlobs
:
[]
,
isReady
:
true
});
createComponent
({
initBlobs
:
[]
});
});
});
it
(
'
shows 1 blob by default
'
,
()
=>
{
it
(
'
shows 1 blob by default
'
,
()
=>
{
...
@@ -287,7 +287,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
...
@@ -287,7 +287,7 @@ describe('snippets/components/snippet_blob_actions_edit', () => {
.
fill
(
1
)
.
fill
(
1
)
.
map
(()
=>
createBlobFromTestEntry
(
testEntries
.
created
));
.
map
(()
=>
createBlobFromTestEntry
(
testEntries
.
created
));
createComponent
({
initBlobs
,
isReady
:
true
});
createComponent
({
initBlobs
});
});
});
it
(
'
should have blobs
'
,
()
=>
{
it
(
'
should have blobs
'
,
()
=>
{
...
...
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