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
fd85c4aa
Commit
fd85c4aa
authored
Jul 10, 2020
by
Austin Regnery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced deprecated button for create commit
parent
71a09d24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
app/assets/javascripts/diffs/components/no_changes.vue
app/assets/javascripts/diffs/components/no_changes.vue
+4
-4
spec/frontend/diffs/components/no_changes_spec.js
spec/frontend/diffs/components/no_changes_spec.js
+8
-0
No files found.
app/assets/javascripts/diffs/components/no_changes.vue
View file @
fd85c4aa
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
Gl
Deprecated
Button
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
export
default
{
components
:
{
Gl
Deprecated
Button
,
GlButton
,
},
props
:
{
changesEmptyStateIllustration
:
{
...
...
@@ -43,9 +43,9 @@ export default {
<div
class=
"text-content text-center"
>
<span
v-html=
"emptyStateText"
></span>
<div
class=
"text-center"
>
<gl-
deprecated-button
:href=
"getNoteableData.new_blob_path"
variant=
"success
"
>
{{
<gl-
button
:href=
"getNoteableData.new_blob_path"
variant=
"success"
category=
"primary
"
>
{{
__
(
'
Create commit
'
)
}}
</gl-
deprecated-
button>
}}
</gl-button>
</div>
</div>
</div>
...
...
spec/frontend/diffs/components/no_changes_spec.js
View file @
fd85c4aa
...
...
@@ -2,6 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import
Vuex
from
'
vuex
'
;
import
{
createStore
}
from
'
~/mr_notes/stores
'
;
import
NoChanges
from
'
~/diffs/components/no_changes.vue
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
describe
(
'
Diff no changes empty state
'
,
()
=>
{
let
vm
;
...
...
@@ -37,4 +38,11 @@ describe('Diff no changes empty state', () => {
expect
(
vm
.
contains
(
'
script
'
)).
toBe
(
false
);
});
describe
(
'
Renders
'
,
()
=>
{
it
(
'
Show create commit button
'
,
()
=>
{
createComponent
();
expect
(
vm
.
find
(
GlButton
).
exists
()).
toBe
(
true
);
});
});
});
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