BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a2b2f1ea
Commit
a2b2f1ea
authored
Jul 21, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Fix issue spinach tests.
parent
c09b5852
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+8
-3
issue_notes_store.js
app/assets/javascripts/notes/stores/issue_notes_store.js
+6
-1
issues.feature
features/project/issues/issues.feature
+0
-1
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
a2b2f1ea
...
...
@@ -90,7 +90,9 @@ export default {
this
.
discard
();
}
})
.
catch
(
this
.
handleError
);
.
catch
(()
=>
{
this
.
discard
(
false
);
});
}
if
(
withIssueAction
)
{
...
...
@@ -109,12 +111,15 @@ export default {
$
(
`.js-btn-issue-action.
${
btnClass
}
:visible`
).
trigger
(
'click'
);
}
},
discard
()
{
discard
(
shouldClear
=
true
)
{
// `blur` is needed to clear slash commands autocomplete cache if event fired.
// `focus` is needed to remain cursor in the textarea.
this
.
$refs
.
textarea
.
blur
();
this
.
$refs
.
textarea
.
focus
();
this
.
note
=
''
;
if
(
shouldClear
)
{
this
.
note
=
''
;
}
},
setNoteType
(
type
)
{
this
.
noteType
=
type
;
...
...
app/assets/javascripts/notes/stores/issue_notes_store.js
View file @
a2b2f1ea
...
...
@@ -251,7 +251,12 @@ const actions = {
context
.
commit
(
'removePlaceholderNotes'
);
return
res
;
});
})
.
catch
(()
=>
{
const
msg
=
'Your comment could not be submitted! Please check your network connection and try again.'
;
Flash
(
msg
,
'alert'
,
$
(
noteData
.
flashContainer
));
context
.
commit
(
'removePlaceholderNotes'
);
})
},
poll
(
context
)
{
const
{
notesPath
}
=
$
(
'.js-notes-wrapper'
)[
0
].
dataset
;
...
...
features/project/issues/issues.feature
View file @
a2b2f1ea
...
...
@@ -46,7 +46,6 @@ Feature: Project Issues
Given
I visit issue page
"Release 0.4"
And
I leave a comment like
"XML attached"
Then
I should see comment
"XML attached"
And
I should see an error alert section within the comment form
@javascript
Scenario
:
Visiting Issues after being sorted the list
...
...
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