fixes FOO-1594
[fsc-timeout=30]
we're still seeing timing errors, hopefully this durably fixes them.
the problem is the call to `take_and_answer_quiz` sets the `lock_at` of
a quiz to the current time plus `lock_after`, then the web driver
proceeds to take the quiz and expects to be able to finish answering its
single question before the "Time's Up!" dialog pops up. if it loses that
race, then it tries to interact with an element that is underneath the
dialog, which causes the spec to fail. the dialog itself is controlled
by a `setInterval(..., 500)` in the browser which pops it up if the
current browser time has passed the quiz's `lock_at`. we don't have a
good way to stub the browser's clock, so the easiest thing we can do
here is to relax our margins and give the driver more time to finish
taking the quiz.
this also deletes some specs and rearranges others.
quizzes_auto_submit_quiz_spec.rb had been really harping on the
difference between lock_at and due_at, but really there's no interaction
between the two that warranted so many granular selenium specs. so those
got consolidated down to just two -- one for the scenario of lock_at
expiring while the quiz is being taken, the other (which now lives in
quizzes_take_quiz_student_spec.rb) that verifies the behavior for a
past-due quiz.
and the spec in quizzes_teacher_spec.rb that just checks for the
"Quiz saved at" message was redundant with an equivalent expectation in
quizzes_student_spec.rb, so it was removed.
Change-Id: I67eba03d5c1c07864b78d081ce8cbdb675bcedeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258597
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>