canvas-lms/spec/graphql
Matthew Lemon 726ee1a6f5 add url to the submission draft model/graphql type
Test Plan
- run the db migration to add url to the SubmissionDraft table
  - bundle exec rake db:migrate:up VERSION=20190916193616

- Create a course and add a student to it
- Create an assignment with a submission type of online url
- Masquerade as the student and navigate to the /graphiql endpoint
- Run the following mutation updated with the appropriate submissionID:
```
mutation MyMutation {
  __typename
  createSubmissionDraft(input: {submissionId: <your_submission_id>, url: "http://www.google.com", attempt: 1}) {
    errors {
      attribute
      message
    }
    submissionDraft {
      _id
      url
      submissionAttempt
    }
  }
}
```

- The mutation should return 0 errors and the submission draft should
  reflect the given url
- Run the following query updated with the appropriate submissionID:
```
query MyQuery {
  __typename
  legacyNode(_id: <your_submission_id>, type: Submission) {
    ... on Submission {
      id
      submissionDraft {
        url
        submissionAttempt
        _id
      }
    }
  }
}
```

- The query result should show the url you entered in the previous
  mutation

refs COMMS-2331
flag=assignments_2

Change-Id: I60d756a9f0a29ea5aece960416edbb43c0949ddc
Reviewed-on: https://gerrit.instructure.com/209727
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2019-09-18 16:35:30 +00:00
..
loaders graphql: "better" association loader 2019-03-06 20:05:56 +00:00
mutations add url to the submission draft model/graphql type 2019-09-18 16:35:30 +00:00
selenium [ci selinimum capture] Revert "re-add and disable graphql feature flag" 2018-03-07 20:15:45 +00:00
types add url to the submission draft model/graphql type 2019-09-18 16:35:30 +00:00
graphql_helpers_spec.rb syntax error patch for graphql_helpers_spec.rb 2017-11-01 14:49:43 +00:00
graphql_spec_helper.rb allow GQL postAssignmentGrades per Submission 2019-08-09 15:38:36 +00:00
legacy_node_spec.rb spec: fix specs using course post policies 2019-06-19 21:09:27 +00:00
mutation_audit_log_spec.rb truncate long strings in mutation audit log 2019-08-14 20:56:03 +00:00
postgres_statement_timeout_spec.rb pre-generate schema to avoid spec timeouts 2019-03-26 23:07:17 +00:00
token_scoping_spec.rb enforce token scoping in graphql 2019-09-13 20:31:52 +00:00