Skip to content

Commit

Permalink
Issue #8 feat: test cases on editor
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinsahu731 committed Jul 27, 2018
1 parent d387712 commit 89528aa
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 103 deletions.
42 changes: 21 additions & 21 deletions editor/controllers/mcq-controller.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion renderer/template/horizontal_template.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var MCQController = MCQController || {};
MCQController.getHorizontalTemplate = function () {
return "<div class='mcq-horizontal-container'><div class='q-container'>\
return "<div class='mcq-horizontal-container'><div class='q-container'>\
<div class='question'>\
<div class='q-media'>\
<% if ( question.data.question.image){ %> \
Expand Down
158 changes: 81 additions & 77 deletions test/editor/mcq-controller.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions test/mocks/editor/questionunit.mock.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
org.ekstep.contenteditor.questionUnitPlugin = org.ekstep.contenteditor.basePlugin.extend({
type: "org.ekstep.contenteditor.questionUnitPlugin"
});

var CKEDITOR = {};
CKEDITOR.replace = function(object) { // eslint-disable-line no-unused-vars
var questionInput = document.createElement('textarea');
questionInput.setAttribute("name", "mcqQuestion");
return $(questionInput);
var questionInput = document.createElement('textarea');
questionInput.setAttribute("name", "mcqQuestion");
return $(questionInput);
};

0 comments on commit 89528aa

Please sign in to comment.