summaryrefslogtreecommitdiff
path: root/spec/javascripts/notes_spec.js
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-03-03 00:10:21 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-03-03 00:10:21 +0800
commit6c5a7d5305e257244168799df0420359d0ad7b57 (patch)
tree197f0293855b02cccfb97e3f319594530b285344 /spec/javascripts/notes_spec.js
parent461ecbcf07f0785b5ea50c62b114bf8217ac5199 (diff)
parent9b704ef327cc0224bf09c1e8d8d27df88ab13734 (diff)
downloadgitlab-ce-6c5a7d5305e257244168799df0420359d0ad7b57.tar.gz
Merge remote-tracking branch 'upstream/master' into 42572-release-controller
* upstream/master: (889 commits) SlackService - respect `notify_only_default_branch` for push events Clarify usage ping wording in admin area Update incoming emails documents Allow to include also descendant group labels Update docs on grouping CI jobs Support additional LabelsFinder parameters for group labels Extend Cluster Applications to install GitLab Runner to Kubernetes cluster Remove registry list webpack entry point Remove trailing newline that was causing an EE conflict Small fixes in Vuex docs Remove u2f webpack bundle Update documentation WRT to request parameters remove common_vue CommonsChunk config Fetch commit signatures from Gitaly in batches migrate stl_viewer to dynamic import migrate sketch_viewer to dynamic import migrate pdf_viewer to dynamic import migrate notebook_viewer to dynamic import migrate balsamiq_viewer to dynamic import Add some strings that were missing in gitlab.pot ...
Diffstat (limited to 'spec/javascripts/notes_spec.js')
-rw-r--r--spec/javascripts/notes_spec.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js
index 274d7591c71..d4a148e6ab1 100644
--- a/spec/javascripts/notes_spec.js
+++ b/spec/javascripts/notes_spec.js
@@ -34,6 +34,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
describe('Notes', function() {
const FLASH_TYPE_ALERT = 'alert';
+ const NOTES_POST_PATH = /(.*)\/notes\?html=true$/;
var commentsTemplate = 'merge_requests/merge_request_with_comment.html.raw';
preloadFixtures(commentsTemplate);
@@ -154,7 +155,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
$form.find('textarea.js-note-text').val(sampleComment);
mock = new MockAdapter(axios);
- mock.onPost(/(.*)\/notes$/).reply(200, noteEntity);
+ mock.onPost(NOTES_POST_PATH).reply(200, noteEntity);
});
afterEach(() => {
@@ -506,11 +507,11 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
let mock;
function mockNotesPost() {
- mock.onPost(/(.*)\/notes$/).reply(200, note);
+ mock.onPost(NOTES_POST_PATH).reply(200, note);
}
function mockNotesPostError() {
- mock.onPost(/(.*)\/notes$/).networkError();
+ mock.onPost(NOTES_POST_PATH).networkError();
}
beforeEach(() => {
@@ -631,7 +632,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
beforeEach(() => {
mock = new MockAdapter(axios);
- mock.onPost(/(.*)\/notes$/).reply(200, note);
+ mock.onPost(NOTES_POST_PATH).reply(200, note);
this.notes = new Notes('', []);
window.gon.current_username = 'root';
@@ -684,7 +685,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
beforeEach(() => {
mock = new MockAdapter(axios);
- mock.onPost(/(.*)\/notes$/).reply(200, note);
+ mock.onPost(NOTES_POST_PATH).reply(200, note);
this.notes = new Notes('', []);
window.gon.current_username = 'root';