ungraded & anon discuss initiated from assignments
refs VICE-4158 flag=react_discussions_post Test plan: - new selenium test passes - Have a course - Discussion/Announcements redesign feature flag ON - Discussion Create/Edit Page React Update flag OFF - Navigate to the assignments tab, select the "+" on the assignment group, change it to discussion and select more options. - On the discussions details page add a title, select "partial" or "full" under anonymous discussion, Remove the "graded" check, and save. - Check if discussion is saved succesfully Change-Id: I149b069c4a08750015812afc7f7a7be71ccc8d67 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348664 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Balázs Buri <balazs.buri@instructure.com>
This commit is contained in:
parent
a5578c6987
commit
baab010df7
|
@ -523,6 +523,19 @@ describe "discussions" do
|
|||
expect_new_page_load { f(".form-actions button[type=submit]").click }
|
||||
expect(fj("span:contains('anonymous topic title')")).to be_present
|
||||
end
|
||||
|
||||
it "able to save anon, not graded, quick added from assignments", :ignore_js_errors do
|
||||
get "/courses/#{course.id}/assignments"
|
||||
|
||||
f(".add_assignment").click
|
||||
click_option(f('[name="submission_types"]'), "Discussion")
|
||||
f(".create_assignment_dialog input[type=text]").send_keys("anon disc from assignment")
|
||||
f(".more_options").click
|
||||
|
||||
f("input[type=radio][value=partial_anonymity]").click
|
||||
f("input#use_for_grading").click
|
||||
expect_new_page_load { f("button.save_and_publish").click }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -863,6 +863,11 @@ EditView.prototype.validateBeforeSave = function (data, errors) {
|
|||
},
|
||||
]
|
||||
}
|
||||
|
||||
if (Object.keys(errors).length === 0 && data.anonymous_state != null) {
|
||||
data.set_assignment = false
|
||||
}
|
||||
|
||||
return errors
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue