Commit ecd135f5 by gradyward

Merge pull request #514 from edx/grady/ORA-675

Changed the default tab to be Prompt, not Settings
parents ecba779b 387122ef
......@@ -83,4 +83,14 @@ describe("OpenAssessment.StudioView", function() {
view.save();
expect(runtime.notify).toHaveBeenCalledWith('error', {msg: 'Test error'});
});
it("displays the correct tab on initialization", function() {
$(".oa_editor_tab", view.element).each(function(){
if ($(this).attr('aria-controls') == "oa_prompt_editor_wrapper"){
expect($(this).hasClass('ui-state-active')).toBe(true);
} else {
expect($(this).hasClass('ui-state-active')).toBe(false);
}
});
});
});
......@@ -93,7 +93,7 @@ OpenAssessment.StudioView.prototype = {
initializeTabs: function() {
// If this is the first editor that the user has opened, default to the prompt view.
if (typeof(OpenAssessment.lastOpenEditingTab) === "undefined") {
OpenAssessment.lastOpenEditingTab = 0;
OpenAssessment.lastOpenEditingTab = 2;
}
// Initialize JQuery UI Tabs, and activates the appropriate tab.
$(".openassessment_editor_content_and_tabs", this.element)
......
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