spec: Add spec to verify pass-fail grading type in speedgrader/GB2
Test Plan: - pass Jenkins - check for syntax errors - make sure new test_ids match up to an existing test case in TestRails Change-Id: I8e738d044eec52ad9380441b1101f7424195c4b0 Reviewed-on: https://gerrit.instructure.com/65862 Tested-by: Jenkins Reviewed-by: Michael Hargiss <mhargiss@instructure.com> Product-Review: Michael Hargiss <mhargiss@instructure.com> QA-Review: Michael Hargiss <mhargiss@instructure.com>
This commit is contained in:
parent
d454218928
commit
9317cd1ea2
|
@ -259,6 +259,25 @@ describe "gradebook2" do
|
|||
expect(@second_assignment.reload).not_to be_muted
|
||||
end
|
||||
|
||||
context 'pass/fail assignment grading' do
|
||||
before :each do
|
||||
init_course_with_students 1
|
||||
@assignment = @course.assignments.create!(grading_type: 'pass_fail', points_possible: 0)
|
||||
@assignment.grade_student(@students[0], grade: 'pass')
|
||||
end
|
||||
|
||||
it 'should allow pass grade on assignments worth 0 points', priority: "1", test_id: 330310 do
|
||||
get "/courses/#{@course.id}/gradebook2"
|
||||
expect(fj('a.gradebook-checkbox.gradebook-checkbox-pass')).to include_text('pass')
|
||||
end
|
||||
|
||||
it 'should display pass/fail correctly when total points possible is changed', priority: "1", test_id: 419288 do
|
||||
@assignment.update_attributes(points_possible: 1)
|
||||
get "/courses/#{@course.id}/gradebook2"
|
||||
expect(fj('a.gradebook-checkbox.gradebook-checkbox-pass')).to include_text('pass')
|
||||
end
|
||||
end
|
||||
|
||||
context "unpublished course" do
|
||||
before do
|
||||
@course.claim!
|
||||
|
|
|
@ -110,6 +110,27 @@ describe 'Speedgrader' do
|
|||
clear_grade_and_validate
|
||||
end
|
||||
|
||||
context 'pass/fail assignment grading' do
|
||||
before :each do
|
||||
init_course_with_students 1
|
||||
@assignment = @course.assignments.create!(grading_type: 'pass_fail', points_possible: 0)
|
||||
@assignment.grade_student(@students[0], grade: 'pass')
|
||||
end
|
||||
|
||||
it 'should allow pass grade on assignments worth 0 points', priority: "1", test_id: 400127 do
|
||||
get "/courses/#{@course.id}/gradebook/speed_grader?assignment_id=#{@assignment.id}#"
|
||||
expect(f('#grading-box-extended')['value']).to eq('complete')
|
||||
expect(fj('#grade_container label').text()).to include_text('(0 / 0)')
|
||||
end
|
||||
|
||||
it 'should display pass/fail correctly when total points possible is changed', priority: "1", test_id: 419289 do
|
||||
@assignment.update_attributes(points_possible: 1)
|
||||
get "/courses/#{@course.id}/gradebook/speed_grader?assignment_id=#{@assignment.id}#"
|
||||
expect(f('#grading-box-extended')['value']).to eq('complete')
|
||||
expect(fj('#grade_container label').text()).to include_text('(1 / 1)')
|
||||
end
|
||||
end
|
||||
|
||||
context 'Using a rubric saves grades' do
|
||||
before do
|
||||
init_course_with_students
|
||||
|
|
Loading…
Reference in New Issue