Commit ea448039 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix broken tests

parent 57f52b9e
......@@ -43,7 +43,7 @@
'getNotesData',
]),
isLoggedIn() {
return this.getUserData !== null;
return this.getUserData.id;
},
commentButtonTitle() {
return this.noteType === constants.COMMENT ? 'Comment' : 'Start discussion';
......@@ -92,7 +92,7 @@
'saveNote',
]),
setIsSubmitButtonDisabled(note, isSubmitting) {
if (!_.isEmpty(note) && !isSubmitting) {
if (!_.isEmpty(note) && !isSubmitting) {
this.isSubmitButtonDisabled = false;
} else {
this.isSubmitButtonDisabled = true;
......
......@@ -137,7 +137,7 @@ module SharedNote
step 'The comment with the header should not have an ID' do
page.within(".note-body > .note-text") do
expect(page).to have_content("Comment with a header")
expect(page).to have_content("Comment with a header")
expect(page).not_to have_css("#comment-with-a-header")
end
end
......@@ -153,10 +153,13 @@ module SharedNote
note.find('.js-note-edit').click
end
page.find('.current-note-edit-form textarea')
page.within(".current-note-edit-form") do
fill_in 'note[note]', with: '+1 Awesome!'
fill_in '#note-body', with: '+1 Awesome!'
click_button 'Save comment'
end
wait_for_requests
end
step 'I should see +1 in the description' do
......
import Vue from 'vue';
import store from '~/notes/stores';
import issueDiscussion from '~/notes/components/issue_discussion.vue';
import { issueDataMock, discussionMock } from '../mock_data';
describe('issue_discussion component', () => {
let vm;
beforeEach(() => {
const Component = Vue.extend(issueDiscussion);
store.dispatch('setIssueData', issueDataMock);
vm = new Component({
store,
propsData: {
note: discussionMock,
},
}).$mount();
});
it('should render user avatar', () => {
console.log('vm', vm.$el);
});
......
......@@ -8,7 +8,7 @@ import ZenMode from '~/zen_mode';
var enterZen, escapeKeydown, exitZen;
describe('ZenMode', function() {
var fixtureName = 'issues/open-issue.html.raw';
var fixtureName = 'merge_requests/merge_request_with_comment.html.raw';
preloadFixtures(fixtureName);
beforeEach(function() {
loadFixtures(fixtureName);
......
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