Commit Graph

2 Commits

Author SHA1 Message Date
Cody Cutrer 6b0095610c RuboCop: Layout spec
[skip-stages=Flakey]

Change-Id: Id479617328562fd009f00db27f248c2ebafa4b7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-09-22 22:40:24 +00:00
Manoel Quirino Neto 8675815425 Resolve outcome friendly descriptions via the account hierarchy
closes OUT-4402
flag=outcomes_friendly_description

Test plan:
  - Create 2 outcomes (outcome 1 and 2) in a course
    Make sure you have those 2 outcomes inside the same group
    to make the test easier
  - Create an outcome friendly description for:
    outcome 1: for the course and for the account
    outcome 2: just for the account
    can create using the snippet in console
    OutcomeFriendlyDescription.create!({
      learning_outcome: outcome,
      context: course || account,
      description: "account or course description"
    })
  - Open graphiql and the queries (replace THE_GROUP_ID,
    THE_COURSE_ID and THE_ACCOUNT_ID):
    {
      legacyNode(type: LearningOutcomeGroup, _id: THE_GROUP_ID) {
        ... on LearningOutcomeGroup {
          outcomes(first: 2) {
            nodes {
              ... on LearningOutcome {
                _id
                title
                friendlyDescription(
                  contextId: THE_COURSE_ID
                  contextType: "Course"
                ) {
                  _id
                  description
                }
              }
            }
          }
        }
      }
    }
    Make sure you see an account friendlyDescription and a course
    friendlyDescription

    {
      legacyNode(type: LearningOutcomeGroup, _id: THE_GROUP_ID) {
        ... on LearningOutcomeGroup {
          outcomes(first: 2) {
            nodes {
              ... on LearningOutcome {
                _id
                title
                friendlyDescription(
                  contextId: THE_ACCOUNT_ID
                  contextType: "Account"
                ) {
                  _id
                  description
                }
              }
            }
          }
        }
      }
    }
    Make sure you see only account friendlyDescriptions for both outcomes

Change-Id: I809422d8762c961ec4e5586fce645e9911ca22ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2021-07-05 12:13:32 +00:00