canvas-lms/spec/requests
Shahbaz Javeed a45e7e1eb0 fix error switching courses in student grades page
allow switching between courses that belong to different grading period
groups

closes GRADE-768

test plan:
* Create three terms in an Account, T1, T2 and T3
* Leave T1 without any grading periods
* Create a new Grading Period set (and grading periods) in T2
* Create a separate new Grading Period set (and grading periods) in T3
  such that there is some overlap between the grading periods from this
  set and the one you created for T2

* Create five courses, C1, C2, C3, C4, C5
* Associate C1 and C2 with term T1 so they have no grading periods
* Associate C3 and C4 with term T2
* Associate C5 with term T3

* Create assignments in each of these courses with at least one
  assignment in each grading period
* Enroll one student in all four of these courses
* Grade this student for all the assignments in all courses

* As the student, visit the grade summary page for C1
* Verify you don't see the grading period filter

* From the filters, change the course to C2 and click "Apply"
* Verify you're now seeing the grade summary page for C2
* Verify the URL does not contain a parameter named "grading_period_id"
* Verify this page doesn't show the grading period filter either

* From the filters, change the course to C3 and click "Apply"
* Verify you're now seeing the grade summary page for C3
* Verify the URL does not contain a parameter named "grading_period_id"
* Verify this page now does show the grading period filter
* Verify the grading period filter shows the current grading period i.e.
  one that covers the date/time right now

* From the filters, change the grading period to another one and
  click "Apply"
* Verify you're still on the grade summary page for C3
* Verify the URL now does contain a parameter named "grading_period_id"
* Verify this page also shows the grading period filter
* Verify the grading period filter shows the grading period you selected

* From the filters, change the course to C4 and click "Apply"
* Verify you're now seeing the grade summary page for C4
* Verify the URL now does contain a parameter named "grading_period_id"
* Verify this page now does show the grading period filter
* Verify that the grading period filter shows the same grading period
  it did for the page you just came from (grade summary for C3)

* From the filters, change the course to C5 and click "Apply"
* Verify you're now seeing the grade summary page for C5
* Verify the URL does not contain a parameter named "grading_period_id"
* Verify this page also shows the grading period filter
* Verify the grading period filter shows the current grading period i.e.
  one that covers the date/time right now

Change-Id: If9ceb843fbcc2d5b38f80ef415feaff34a8c96ba
Reviewed-on: https://gerrit.instructure.com/139115
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-02-15 17:29:55 +00:00
..
gradebooks_controller_spec.rb fix error switching courses in student grades page 2018-02-15 17:29:55 +00:00