summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-12-06 20:54:11 -0600
committerEric Eastwood <contact@ericeastwood.com>2017-12-06 23:13:01 -0600
commit2b7a0e45d233515435de56193e1042a0a6b07996 (patch)
tree090e7797e6ee2900d2cf3c6326a6a31ae7f51805
parent743451b231445bfc2ee295d8097bdcdeb1ff47ad (diff)
downloadgitlab-ce-37619-typeerror-debugging1.tar.gz
WIP: debugging typeerrors37619-typeerror-debugging1
-rw-r--r--app/assets/javascripts/notes/components/issue_note.vue4
-rw-r--r--config/karma.config.js2
-rw-r--r--spec/javascripts/notes/components/issue_note_app_spec.js4
-rw-r--r--spec/javascripts/test_bundle.js20
4 files changed, 26 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes/components/issue_note.vue b/app/assets/javascripts/notes/components/issue_note.vue
index 8c81c5d6df3..0b0fce5f934 100644
--- a/app/assets/javascripts/notes/components/issue_note.vue
+++ b/app/assets/javascripts/notes/components/issue_note.vue
@@ -122,9 +122,9 @@
// we need to do this to prevent noteForm inconsistent content warning
// this is something we intentionally do so we need to recover the content
this.note.note = noteText;
- if (this.$refs.noteBody) {
+ //if (this.$refs.noteBody) {
this.$refs.noteBody.$refs.noteForm.note = noteText; // TODO: This could be better
- }
+ //}
},
},
created() {
diff --git a/config/karma.config.js b/config/karma.config.js
index 9f018d14b8f..38641459bfa 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -3,6 +3,8 @@ var webpack = require('webpack');
var webpackConfig = require('./webpack.config.js');
var ROOT_PATH = path.resolve(__dirname, '..');
+console.log('now in karma.config.js');
+
// remove problematic plugins
if (webpackConfig.plugins) {
webpackConfig.plugins = webpackConfig.plugins.filter(function (plugin) {
diff --git a/spec/javascripts/notes/components/issue_note_app_spec.js b/spec/javascripts/notes/components/issue_note_app_spec.js
index 8e43037f356..b6e88452dd8 100644
--- a/spec/javascripts/notes/components/issue_note_app_spec.js
+++ b/spec/javascripts/notes/components/issue_note_app_spec.js
@@ -3,7 +3,7 @@ import issueNotesApp from '~/notes/components/issue_notes_app.vue';
import service from '~/notes/services/notes_service';
import * as mockData from '../mock_data';
-describe('issue_note_app', () => {
+fdescribe('issue_note_app', () => {
let mountComponent;
let vm;
@@ -183,7 +183,7 @@ describe('issue_note_app', () => {
}, 0);
});
- it('updates the note and resets the edit form', (done) => {
+ fit('updates the note and resets the edit form', (done) => {
setTimeout(() => {
vm.$el.querySelector('.js-note-edit').click();
Vue.nextTick(() => {
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index fd7aa332d17..609b238cdde 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -11,11 +11,16 @@ const isHeadlessChrome = /\bHeadlessChrome\//.test(navigator.userAgent);
Vue.config.devtools = !isHeadlessChrome;
Vue.config.productionTip = false;
+const nonce = 9999 * Math.random();
+console.log('test_bundle.js', nonce, isHeadlessChrome, new Error().stack);
+
let hasVueWarnings = false;
+/* * /
Vue.config.warnHandler = (msg, vm, trace) => {
hasVueWarnings = true;
fail(`${msg}${trace}`);
};
+/* */
Vue.use(VueResource);
@@ -40,6 +45,21 @@ window.addEventListener('unhandledrejection', (event) => {
console.error(event.reason.stack || event.reason);
});
+beforeAll(() => {
+ /* */
+ const origError = console.error;
+ spyOn(console, 'error').and.callFake((message) => {
+ console.log(`console error message ${nonce} |||${message}|||`, new Error().stack);
+ if (/^\[Vue warn\]/.test(message)) {
+ console.log('we found a Vue warn!!!');
+ //fail(message);
+ } else {
+ origError(message);
+ }
+ });
+ /* */
+});
+
// HACK: Chrome 59 disconnects if there are too many synchronous tests in a row
// because it appears to lock up the thread that communicates to Karma's socket
// This async beforeEach gets called on every spec and releases the JS thread long