Commit 584ea586 authored by Phil Hughes's avatar Phil Hughes

Fixed tests on textarea looking for innerText instead of value

parent 598b05df
......@@ -208,7 +208,6 @@ class Projects::IssuesController < Projects::ApplicationController
description: view_context.markdown_field(@issue, :description),
description_text: @issue.description,
task_status: @issue.task_status,
issue_number: @issue.iid,
updated_at: @issue.updated_at,
}
end
......
......@@ -13,7 +13,7 @@ const issueShowInterceptor = data => (request, next) => {
}));
};
describe('Issuable output', () => {
fdescribe('Issuable output', () => {
document.body.innerHTML = '<span id="task_status"></span>';
let vm;
......@@ -43,7 +43,7 @@ describe('Issuable output', () => {
expect(document.querySelector('title').innerText).toContain('this is a title (#1)');
expect(vm.$el.querySelector('.title').innerHTML).toContain('<p>this is a title</p>');
expect(vm.$el.querySelector('.wiki').innerHTML).toContain('<p>this is a description!</p>');
expect(vm.$el.querySelector('.js-task-list-field').innerText).toContain('this is a description');
expect(vm.$el.querySelector('.js-task-list-field').value).toContain('this is a description');
Vue.http.interceptors.push(issueShowInterceptor(issueShowData.secondRequest));
......@@ -51,7 +51,7 @@ describe('Issuable output', () => {
expect(document.querySelector('title').innerText).toContain('2 (#1)');
expect(vm.$el.querySelector('.title').innerHTML).toContain('<p>2</p>');
expect(vm.$el.querySelector('.wiki').innerHTML).toContain('<p>42</p>');
expect(vm.$el.querySelector('.js-task-list-field').innerText).toContain('42');
expect(vm.$el.querySelector('.js-task-list-field').value).toContain('42');
done();
});
......
......@@ -4,23 +4,23 @@ export default {
title_text: 'this is a title',
description: '<p>this is a description!</p>',
description_text: 'this is a description',
issue_number: 1,
task_status: '2 of 4 completed',
updated_at: new Date().toString(),
},
secondRequest: {
title: '<p>2</p>',
title_text: '2',
description: '<p>42</p>',
description_text: '42',
issue_number: 1,
task_status: '0 of 0 completed',
updated_at: new Date().toString(),
},
issueSpecRequest: {
title: '<p>this is a title</p>',
title_text: 'this is a title',
description: '<li class="task-list-item enabled"><input type="checkbox" class="task-list-item-checkbox">Task List Item</li>',
description_text: '- [ ] Task List Item',
issue_number: 1,
task_status: '0 of 1 completed',
updated_at: new Date().toString(),
},
};
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