Skip to content

Commit

Permalink
spec: fix newly embrittled spec
Browse files Browse the repository at this point in the history
i think there may still be a bit of broken stuff here, but at least this
returns the spec to its previous passing behavior (more or less)

problems probably worth investigating:
1. student view quiz submissions result in `TypeError: submissionHistory
   is null` js errors (the problem we're working around here)
2. student view quiz submissions on a non-quiz result in a 500 in the
   submission pane. that may not even be a valid thing/supported, but it's
   what the spec does now (and did before the refactor that broke it)

Change-Id: Ie74cd94c671271b89db39b38218e4ad9a599fb04
Reviewed-on: https://gerrit.instructure.com/68153
Reviewed-by: Clay Diffrient <[email protected]>
Product-Review: Jon Jensen <[email protected]>
QA-Review: Jon Jensen <[email protected]>
Tested-by: Jenkins
  • Loading branch information
jenseng committed Dec 3, 2015
1 parent 5b9ba89 commit 0db21ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/selenium/speedgrader_quiz_submissions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
end

it "includes fake student (Student View Student) submissions in 'X/Y Graded' text", priority: "2", test_id: 283991 do
# TODO: this *should* be a quiz, since that's the submission type,
# but that causes `TypeError: submissionHistory is null` in an ajax
# callback, which usually causes this spec to hang and ultimately fail
# in wait_for_ajaximations
@assignment = @course.assignments.create(:name => 'assignment', :points_possible => 10)

fake_student = @course.student_view_student
submission = @assignment.find_or_create_submission(fake_student)
submission.submission_type = 'online_quiz'
Expand All @@ -181,6 +187,6 @@
get "/courses/#{@course.id}/gradebook/speed_grader?assignment_id=#{@assignment.id}"
wait_for_ajaximations

expect(f("#x_of_x_graded").text).to eq "2 / 2 Graded"
expect(f("#x_of_x_graded").text).to eq "1 / 2 Graded"
end
end

0 comments on commit 0db21ab

Please sign in to comment.