canvas-lms/packages/js-utils
Ed Schiebel c6df32c76f Show observee data on the student planner
the planner used to rely on ENV.STUDENT_PLANNER_COURSES
it now makes a request to get dashboard_cards to
acquire the info it needs about the user's list of
courses.

closes LS-2919
flag=observer_picker

test plan:
  AS A NOT K5 STUDENT
  > expect the planner to load assignments
  - click the + and add a note to the user
  - click the + and add a note to a course
  > expect both notes to be in the planner,
    even after you refresh
  - click the grades button
  > expect grades to be loaded in the tray
  - have a missing assignment, and click the
    opportunities button
  > expect the missing assignment(s) to show up
  - dismiss one
  > expect it to move to the dismissed tab

  AS AN OBSERVER OF THIS STUDENT
  - and another student
  > expect the planner to load assignments
  > expect the planner to show grades
  > expect the planner to show opportunities
  - Don't bother adding notes or dismissing
    opportunities, those will eventually get
    disabled.
  - switch observed students
  > expect the planner to update with new data
  - switch to the card dashboar and expect it
    to be correct
  - refresh so the cards are the default, then
    switch to the planner
  - do ^that, but switch observees before switching
    dashboard views

  AS A K5 STUDENT
  > expect the Homeroom to show the right data
    - e.g. stuff due today and stuff missing
  > expect the Schedule tab to show the right data
   - e.g. assignments and missing items

  AS AN OBSERVER OF A K5 STUDENT
  - and another k5 student
  > expect it to work as it always has
  - switch observed student
  > expect the dashboard to update with new data
  - start from different default dashboards
    and switch dashboard views or switch observees
    then try the other way around.

  AS AN ENROLLED STUDENT OBSERVING A STUDENT
  > expect the dashboards to default to observing
    the current user
  - switch to observing your student
  > expect the dashboards to reflect the new observee
  - refresh
  > expect to be observing the student by default
  - switch to observing the observer
  > expect the right stuff to happen

  TURN OFF THE observer_picker FEATURE
  > expect all dashboards to still work correctly

  *** BONUS *****
  > expect the initial queries for dashboard_cards,
    missing_submissions, and planner/items
    to be the result of the prefetch.  On loading
    the planner page, you should see only 1 copy
    of the various requests until you start
    interacting with the page

Change-Id: I5a2b1eb2fbc812bbf6ee0bb9c037f21ab99cb007
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284754
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-02-25 18:51:18 +00:00
..
src Show observee data on the student planner 2022-02-25 18:51:18 +00:00
.gitignore allow packages to commit lib files 2019-07-17 15:27:09 +00:00
package.json Show observee data on the student planner 2022-02-25 18:51:18 +00:00