From 7eee53c27a62f94953a5d12bd7c05804f724c111 Mon Sep 17 00:00:00 2001 From: Heath Hales Date: Thu, 14 Sep 2017 13:40:23 -0600 Subject: [PATCH] spec: 3340306 show mark done button for lti assignments Change-Id: I0a3231c11d7a54552d503d81d016e23f20d694dc Reviewed-on: https://gerrit.instructure.com/126148 Tested-by: Jenkins Reviewed-by: Robert Lamb Product-Review: Robert Lamb QA-Review: Robert Lamb --- spec/selenium/context_modules_student_spec.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/selenium/context_modules_student_spec.rb b/spec/selenium/context_modules_student_spec.rb index 1b6f7017fac..5cc2d6a19fd 100644 --- a/spec/selenium/context_modules_student_spec.rb +++ b/spec/selenium/context_modules_student_spec.rb @@ -473,6 +473,26 @@ describe "context modules" do end end + it "shows Mark as Done button for assignments with external tool submission", priority: "2", test_id: 3340306 do + tool = @course.context_external_tools.create!(name: "a", + url: "example.com", + consumer_key: '12345', + shared_secret: 'secret') + @assignment = @course.assignments.create! + @assignment.tool_settings_tool = tool + @assignment.submission_types = "external_tool" + @assignment.external_tool_tag_attributes = {url: tool.url} + @assignment.save! + + @mark_done_module = create_context_module('Mark Done Module') + @tag = @mark_done_module.add_item({id: @assignment.id, type: 'assignment'}) + @mark_done_module.completion_requirements = {@tag.id => {type: 'must_mark_done'}} + @mark_done_module.save! + + get "/courses/#{@course.id}/assignments/#{@assignment.id}" + expect(f('#content')).to contain_css('#mark-as-done-checkbox') + end + describe "module header icons" do def create_additional_assignment_for_module_1 @assignment_4 = @course.assignments.create!(:title => "assignment 4")