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
9ea5a016
Commit
9ea5a016
authored
Oct 20, 2020
by
Axel García
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicit preventDefault on new epic page form
parent
77038586
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
ee/app/assets/javascripts/epic/components/epic_form.vue
ee/app/assets/javascripts/epic/components/epic_form.vue
+1
-1
ee/changelogs/unreleased/229621-new-epic-button-in-epic-list-should-direct-the-user-to-a-full-e.yml
...utton-in-epic-list-should-direct-the-user-to-a-full-e.yml
+5
-0
ee/spec/frontend/epic/components/epic_form_spec.js
ee/spec/frontend/epic/components/epic_form_spec.js
+11
-3
No files found.
ee/app/assets/javascripts/epic/components/epic_form.vue
View file @
9ea5a016
...
...
@@ -118,7 +118,7 @@ export default {
<h3
class=
"page-title gl-border-b-solid gl-border-b-gray-100 gl-border-b-1 gl-pb-5 gl-mb-6"
>
{{
__
(
'
New Epic
'
)
}}
</h3>
<gl-form
class=
"common-note-form new-epic-form"
@
submit=
"save"
>
<gl-form
class=
"common-note-form new-epic-form"
@
submit
.prevent
=
"save"
>
<gl-form-group
:label=
"__('Title')"
label-for=
"epic-title"
>
<gl-form-input
id=
"epic-title"
...
...
ee/changelogs/unreleased/229621-new-epic-button-in-epic-list-should-direct-the-user-to-a-full-e.yml
0 → 100644
View file @
9ea5a016
---
title
:
Fix epic creation form submission as it was causing errors on Safari
merge_request
:
45721
author
:
type
:
fixed
ee/spec/frontend/epic/components/epic_form_spec.js
View file @
9ea5a016
...
...
@@ -5,8 +5,11 @@ import EpicForm from 'ee/epic/components/epic_form.vue';
import
createEpic
from
'
ee/epic/queries/createEpic.mutation.graphql
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
LabelsSelectVue
from
'
~/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
jest
.
mock
(
'
~/lib/utils/url_utility
'
);
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
visitUrl
:
jest
.
fn
(),
}));
const
TEST_GROUP_PATH
=
'
gitlab-org
'
;
const
TEST_NEW_EPIC
=
{
data
:
{
createEpic
:
{
epic
:
{
webUrl
:
TEST_HOST
}
}
}
};
...
...
@@ -42,6 +45,7 @@ describe('ee/epic/components/epic_form.vue', () => {
wrapper
=
null
;
});
const
findForm
=
()
=>
wrapper
.
find
(
GlForm
);
const
findLabels
=
()
=>
wrapper
.
find
(
LabelsSelectVue
);
const
findTitle
=
()
=>
wrapper
.
find
(
'
[data-testid="epic-title"]
'
);
const
findDescription
=
()
=>
wrapper
.
find
(
'
[data-testid="epic-description"]
'
);
...
...
@@ -59,7 +63,7 @@ describe('ee/epic/components/epic_form.vue', () => {
});
it
(
'
should render the form
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlForm
).
exists
()).
toBe
(
true
);
expect
(
findForm
(
).
exists
()).
toBe
(
true
);
});
it
(
'
can be canceled
'
,
()
=>
{
...
...
@@ -107,7 +111,7 @@ describe('ee/epic/components/epic_form.vue', () => {
findStartDate
().
vm
.
$emit
(
'
input
'
,
startDateFixed
);
findDueDate
().
vm
.
$emit
(
'
input
'
,
dueDateFixed
);
wrapper
.
vm
.
save
(
);
findForm
().
vm
.
$emit
(
'
submit
'
,
{
preventDefault
:
()
=>
{}
}
);
expect
(
wrapper
.
vm
.
$apollo
.
mutate
).
toHaveBeenCalledWith
({
mutation
:
createEpic
,
...
...
@@ -125,6 +129,10 @@ describe('ee/epic/components/epic_form.vue', () => {
},
},
});
await
wrapper
.
vm
.
$nextTick
();
expect
(
visitUrl
).
toHaveBeenCalled
();
});
it
.
each
`
...
...
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