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
7065bb3e
Commit
7065bb3e
authored
Aug 04, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix vue broken test
parent
c28df4bc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+6
-5
issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+3
-3
quick_submit_spec.js
spec/javascripts/behaviors/quick_submit_spec.js
+3
-3
issue_placeholder_system_note_spec.js
...ts/notes/components/issue_placeholder_system_note_spec.js
+2
-3
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
7065bb3e
...
...
@@ -218,8 +218,10 @@
:img-size=
"40"
/>
</div>
<div
class=
"js-main-target-form timeline-content timeline-content-form common-note-form"
>
<form>
<div
>
<form
class=
"js-main-target-form timeline-content timeline-content-form common-note-form"
@
submit=
"handleSave(true)"
>
<markdown-field
:markdown-preview-url=
"markdownPreviewUrl"
:markdown-docs=
"markdownDocsUrl"
...
...
@@ -228,7 +230,7 @@
<textarea
id=
"note-body"
name=
"note[note]"
class=
"note-textarea js-gfm-input markdown-area"
class=
"note-textarea js-gfm-input
js-autosize
markdown-area"
data-supports-quick-actions=
"true"
aria-label=
"Description"
v-model=
"note"
...
...
@@ -300,8 +302,7 @@
</ul>
</div>
<button
type=
"button"
@
click=
"handleSave(true)"
type=
"submit"
v-if=
"canUpdateIssue"
:class=
"actionButtonClassNames"
class=
"btn btn-nr btn-comment btn-comment-and-close"
>
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
7065bb3e
...
...
@@ -118,7 +118,8 @@
</div>
<div
class=
"flash-container timeline-content"
></div>
<form
class=
"edit-note common-note-form js-vue-quick-submit"
>
class=
"edit-note common-note-form"
@
submit=
"handleUpdate"
>
<markdown-field
:markdown-preview-url=
"markdownPreviewUrl"
:markdown-docs=
"markdownDocsUrl"
...
...
@@ -141,8 +142,7 @@
</markdown-field>
<div
class=
"note-form-actions clearfix"
>
<button
type=
"button"
@
click=
"handleUpdate"
type=
"submit"
:disabled=
"isDisabled"
class=
"btn btn-nr btn-save"
>
{{
saveButtonTitle
}}
...
...
spec/javascripts/behaviors/quick_submit_spec.js
View file @
7065bb3e
...
...
@@ -38,19 +38,19 @@ import '~/behaviors/quick_submit';
return
expect
(
this
.
spies
.
submit
).
not
.
toHaveBeenTriggered
();
});
it
(
'disables input of type submit'
,
function
()
{
const
submitButton
=
$
(
'.js-
vue-
quick-submit input[type=submit]'
);
const
submitButton
=
$
(
'.js-quick-submit input[type=submit]'
);
this
.
textarea
.
trigger
(
keydownEvent
());
expect
(
submitButton
).
toBeDisabled
();
});
it
(
'disables button of type submit'
,
function
()
{
const
submitButton
=
$
(
'.js-
vue-
quick-submit input[type=submit]'
);
const
submitButton
=
$
(
'.js-quick-submit input[type=submit]'
);
this
.
textarea
.
trigger
(
keydownEvent
());
expect
(
submitButton
).
toBeDisabled
();
});
it
(
'only clicks one submit'
,
function
()
{
const
existingSubmit
=
$
(
'.js-
vue-
quick-submit input[type=submit]'
);
const
existingSubmit
=
$
(
'.js-quick-submit input[type=submit]'
);
// Add an extra submit button
const
newSubmit
=
$
(
'<button type="submit">Submit it</button>'
);
newSubmit
.
insertAfter
(
this
.
textarea
);
...
...
spec/javascripts/notes/components/issue_placeholder_system_note_spec.js
View file @
7065bb3e
...
...
@@ -18,8 +18,7 @@ describe('issue placeholder system note component', () => {
it
(
'should render system note placeholder with plain text'
,
()
=>
{
const
vm
=
mountComponent
(
'This is a placeholder'
);
expect
(
vm
.
$el
.
tagName
).
toEqua
(
'LI'
);
expect
(
vm
.
$el
.
querySelector
(
'.timeline-content i'
).
textContent
.
trim
()).
toEqua
(
'This is a placeholder'
);
expect
(
vm
.
$el
.
tagName
).
toEqual
(
'LI'
);
expect
(
vm
.
$el
.
querySelector
(
'.timeline-content em'
).
textContent
.
trim
()).
toEqual
(
'This is a placeholder'
);
});
});
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