Commit a432ae9d authored by Filipa Lacerda's avatar Filipa Lacerda

Tests

parent 667f8b53
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment