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
54596f5f
Commit
54596f5f
authored
Aug 27, 2020
by
Alexis Ginsberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate deprecated create issue button in epic tree form
parent
0a0922a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
ee/app/assets/javascripts/related_items_tree/components/create_issue_form.vue
...ripts/related_items_tree/components/create_issue_form.vue
+6
-7
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
...d/related_items_tree/components/create_issue_form_spec.js
+4
-4
No files found.
ee/app/assets/javascripts/related_items_tree/components/create_issue_form.vue
View file @
54596f5f
<
script
>
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
Gl
Deprecated
Button
,
GlButton
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlFormInput
,
...
...
@@ -16,7 +16,7 @@ import { SEARCH_DEBOUNCE } from '../constants';
export
default
{
components
:
{
Gl
Deprecated
Button
,
GlButton
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlFormInput
,
...
...
@@ -171,19 +171,18 @@ export default {
<div
class=
"row my-1"
>
<div
class=
"col-sm flex-sm-grow-0 mb-2 mb-sm-0"
>
<gl-
deprecated-
button
<gl-button
class=
"w-100"
variant=
"success"
category=
"primary"
:disabled=
"!selectedProject || itemCreateInProgress"
:loading=
"itemCreateInProgress"
@
click=
"createIssue"
>
{{
__
(
'
Create issue
'
)
}}
</gl-
deprecated-
button
>
{{
__
(
'
Create issue
'
)
}}
</gl-button
>
</div>
<div
class=
"col-sm flex-sm-grow-0 ml-auto"
>
<gl-deprecated-button
class=
"w-100"
@
click=
"cancel"
>
{{
__
(
'
Cancel
'
)
}}
</gl-deprecated-button>
<gl-button
class=
"w-100"
@
click=
"cancel"
>
{{
__
(
'
Cancel
'
)
}}
</gl-button>
</div>
</div>
</div>
...
...
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
View file @
54596f5f
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
{
Gl
Deprecated
Button
,
GlButton
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlFormInput
,
...
...
@@ -233,7 +233,7 @@ describe('CreateIssueForm', () => {
});
it
(
'
renders `Create issue` button
'
,
()
=>
{
const
createIssueButton
=
wrapper
.
findAll
(
Gl
Deprecated
Button
).
at
(
0
);
const
createIssueButton
=
wrapper
.
findAll
(
GlButton
).
at
(
0
);
expect
(
createIssueButton
.
exists
()).
toBe
(
true
);
expect
(
createIssueButton
.
text
()).
toBe
(
'
Create issue
'
);
...
...
@@ -243,7 +243,7 @@ describe('CreateIssueForm', () => {
wrapper
.
vm
.
$store
.
dispatch
(
'
requestCreateItem
'
);
return
wrapper
.
vm
.
$nextTick
(()
=>
{
const
createIssueButton
=
wrapper
.
findAll
(
Gl
Deprecated
Button
).
at
(
0
);
const
createIssueButton
=
wrapper
.
findAll
(
GlButton
).
at
(
0
);
expect
(
createIssueButton
.
exists
()).
toBe
(
true
);
expect
(
createIssueButton
.
props
(
'
disabled
'
)).
toBe
(
true
);
...
...
@@ -252,7 +252,7 @@ describe('CreateIssueForm', () => {
});
it
(
'
renders `Cancel` button
'
,
()
=>
{
const
cancelButton
=
wrapper
.
findAll
(
Gl
Deprecated
Button
).
at
(
1
);
const
cancelButton
=
wrapper
.
findAll
(
GlButton
).
at
(
1
);
expect
(
cancelButton
.
exists
()).
toBe
(
true
);
expect
(
cancelButton
.
text
()).
toBe
(
'
Cancel
'
);
...
...
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