Tests
This commit is contained in:
parent
667f8b53ee
commit
a432ae9d06
3 changed files with 5 additions and 4 deletions
|
@ -118,7 +118,7 @@
|
|||
</div>
|
||||
<div class="flash-container timeline-content"></div>
|
||||
<form
|
||||
class="edit-note common-note-form">
|
||||
class="edit-note common-note-form js-vue-quick-submit">
|
||||
<markdown-field
|
||||
:markdown-preview-url="markdownPreviewUrl"
|
||||
:markdown-docs="markdownDocsUrl"
|
||||
|
|
|
@ -28,6 +28,7 @@ import '~/lib/utils/common_utils';
|
|||
preloadFixtures('issues/issue_with_comment.html.raw');
|
||||
beforeEach(function(done) {
|
||||
loadFixtures('issues/issue_with_comment.html.raw');
|
||||
$('body').data('page', 'projects:issues:show');
|
||||
loadAwardsHandler(true).then((obj) => {
|
||||
awardsHandler = obj;
|
||||
spyOn(awardsHandler, 'postEmoji').and.callFake((button, url, emoji, cb) => cb());
|
||||
|
|
|
@ -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-quick-submit input[type=submit]');
|
||||
const submitButton = $('.js-vue-quick-submit input[type=submit]');
|
||||
this.textarea.trigger(keydownEvent());
|
||||
|
||||
expect(submitButton).toBeDisabled();
|
||||
});
|
||||
it('disables button of type submit', function() {
|
||||
const submitButton = $('.js-quick-submit input[type=submit]');
|
||||
const submitButton = $('.js-vue-quick-submit input[type=submit]');
|
||||
this.textarea.trigger(keydownEvent());
|
||||
|
||||
expect(submitButton).toBeDisabled();
|
||||
});
|
||||
it('only clicks one submit', function() {
|
||||
const existingSubmit = $('.js-quick-submit input[type=submit]');
|
||||
const existingSubmit = $('.js-vue-quick-submit input[type=submit]');
|
||||
// Add an extra submit button
|
||||
const newSubmit = $('<button type="submit">Submit it</button>');
|
||||
newSubmit.insertAfter(this.textarea);
|
||||
|
|
Loading…
Reference in a new issue