Why:
- The current way of including the forwarder code involves using a
bundle, All the extra unnecessary Canvas code slows things down, costs
more to serve, and can cause errors because some things it expects to
work don't in the iframe.
- This includes the script as a static asset which will be served from
the CDN and only be refetched by the client when the the script
content changes, otherwise it will be cached for a year
(365.2425 days). It will also be gzip-compressed when delivered to
web browsers.
Credit to Jacob Burroughs for figuring out this approach.
Test plan:
Note: this is pretty much the same test plan as the next commit so you
can test just test that commit.
- after checking out code, run `yarn gulp rev` (this may also be done as
part of building assets?).
- to make sure you get the new code, clear your browser's cache, load a
canvas page, and open dev tools. In Network find the (web/doc) request
for /post_message_forwarding?target=... and visit the page to make
sure it has the new code (with script
src="/...lti_post_message_forwarding-1244...js" tag)
- launch an LTI tool and send messages to the forwarder iframe (platform
storage target) and make sure you get the appropriate response. You
can use can use messages like:
{"subject":"lti.put_data","key":"a","value":"b","message_id":"12"}
{"subject":"lti.get_data","key":"a","message_id":"12"}
- send messages from the tool to the parent window and make sure those
work too.
- embed an LTI tool in RCE content and while still editing the content,
send messages from the tool to both the platform storage target and
the parent window, as in the previous 2 steps.
refs INTEROP-8279
flag=none
Change-Id: I0d4ced28efc3c0c7d8180e72d56bab54557d3cce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334733
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Removes global use of jest-fetch-mock, which inhibits
migration to vitest.
Also:
- TypeScriptify Confetti
- more properly tests confetti with testing-library
- removes needless setTimeout on confetti SR-only flashAlert
Test plan
- Submit assignment as student
- Confetti should still show
flag=none
Change-Id: I70fdc23dbc6d18a37487abeaa7625c441cc64d77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333193
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag=none
See https://momentjs.com/guides/#/warnings/js-date/ for more details
test plan:
- tests pass
qa risk: low
Change-Id: Id6ad8cf7b5e7482104cee59d430f0f15206db759
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331204
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
test plan:
- test inbox badge in old and new side nav in multiple tabs
flag=instui_nav
Refs FOO-3642
Change-Id: Ic17ea9bbfd8ce48b7daae4b8be19722b9e3736a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331894
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gustavo Bernardes <gustavo.bernardes@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
test plan:
- smoke test badges on old and new nav
- smoke test profile tray on old and new nav
flag=instui_nav
Refs FOO-3880
Refs FOO-3887
Refs FOO-3894
Refs FOO-3895
Change-Id: I1d3a669aee09dc67b04e798a23e016d26f398fd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331758
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Gustavo Bernardes <gustavo.bernardes@instructure.com>
refs LF-46
flag=none
A previous patch upgraded the library that was the root cause of this
warning.
test plan:
- n/a
qa risk: low
Change-Id: Id309ecb70515ff444e23a38069d7cb19ca6eefce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330029
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
flag=none
A previous patch resolved this error, removing to enforce it moving
forward
test plan:
- n/a
qa risk: low
Change-Id: Ia270cd02f10128bce3cc91bf46fbc1c02eb75fd0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330051
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag=none
The error has been resolved in previous commits.
test plan:
- n/a
qa risk: low
Change-Id: Ia60581e03f420a038fd76db4ba9da30e4a658f1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330030
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
also: reduced need for specialized babel config
test plan:
- existing tests pass
flag=none
Change-Id: I2625830f01b2d65da0dad02e740f458dfb96863a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323643
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
closes LF-328
flag=media_links_use_attachment_id
Test plan:
1. In the files area in a course (or user)
2. Open the preview for a video file
(upload one if needed).
3. Try to upload a CC via the CC menu and
check that the correct media_attachments/
route was used and not media_objects/
Change-Id: I55e1c2fffe44de089c39b5eb96c4ba634198d242
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319253
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
Refs FOO-3190
flag=none
Trying to uprev InstUI to version 8 revealed that our
front-end build config needs a little attention first.
Most of this was stuff that's been "wrong" for a while
but this major version upgrade of a major dependency
really uncovered where some things needed to be tweaked.
Test plan:
* This only touches build toolchain stuff, so...
* If the automated build passes, this should be good
Change-Id: I89bd29a581a8c84b7f82d319a0501a4adf59016e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318035
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
closes LS-3986
flag=auto_subscribe_account_calendars
test plan:
- have a student in a couple courses in different sub-accounts
- have one sub-acccount's calendar auto-subscribe (by setting
account_calendar_subscription_type="auto" on the account)
- open the calendar as the student
> expect to see the auto-subscribed calendar in the sidebar
- hover over that calendar
> expect no 'x' to remove the calendar
- click the + to add other calendar to open the Select Calendars
modal
> expect the auto-subscribed calendar's checkbox to be disabled
- check the other account calendar's checkbox and Save Changes
> expect both calendars in the sidebar
- hover over each of them
> expect an 'x' to delete the non-auto-subscribed calendar and
no 'x' on the auto-subscribed calendar
Change-Id: I7c22eb3a20f3cbfb0dbe04d540e31d585c0a111a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317430
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Introduces DISABLE_JEST_TIMEOUT_LIMIT which disables the jest test
timeout limit, useful for local debugging in some IDEs
(such as RubyMine)
flag=none
Closes MAT-1063
Test plan:
- Tests pass
- Run a jest test in RubyMine with and without
DISABLE_JEST_TIMEOUT_LIMIT=true
- Without it, tests won't run
- With it, they do
Change-Id: I5f422dad4476bb1824dfb487baf24fc53570a4cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314983
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Avoid updating the parent component state in the component body, use
a react hook instead
closes: LS-3840
flag=none
Test plan:
- Tests pass
- Confirm the unread notifications in the navigation
work as usual.
- Confirm the shared contents table works as usual,
and contents are announced by VO
Change-Id: Id50d7330b6f8759ab4ad021325a416d350da259c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314325
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Use a callback to notify the observer picker when the highlighted
option changes, so we no longer need to use a function as a child
to access this value.
refs LS-3837
flag=none
test plan:
- Tests pass
- Expect the observer picker to behave and look as usual in normal
canvas and k5.
- Expect not to see errors associated with the observer picker in the
console
Change-Id: Ic205828bed4882f27ff874b3eef28fd043b19b6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313385
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I80094c9d8ca9c5fb86ff87b4a7677ebf8b4b3704
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312456
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I078b51df01866a44d3d2ffa322efa7cf987b4c72
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312437
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: Ib5b5adfcb5927c39671affc5d63be158b4b847a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312408
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I92774c7531572346afe4a2daba636165ee2d95bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312407
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I620e929a1dac843b4c982d5f5b8df4e9c4b4c10c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312111
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I0b889d2db9851090150d28af705027589d323438
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312183
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: Idaff282b02b178b6ae181cddd5219817e0a2d6f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312181
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
When run in succession, the previous two tests would result in an error
being logged to the console regarding changing stores:
`<Provider> does not support changing `store` on the fly. It is most
likely that you see this error because you updated to Redux 2.x and
React Redux 2.x which no longer hot reload reducers automatically. See
https://github.com/reduxjs/react-redux/releases/tag/v2.0.0 for the
migration instructions.`
Reading the tests however, we are simply repeating behavior between the
two (mounting of the component). To simplify the test behavior, I opted
to combine the tests into a single test that has resolved the issue.
test plan:
- tests pass
qa risk: low
Change-Id: I45b32a3a2a03fd1da36ec6e036446af5596c5ee2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312180
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
refs LS-3831
flag=none
Although under the hood, Select.Option renders an option element, InstUI
expects the children of Select to be only a Select.Option or a
Select.Group
Each feature team will want to check their respective components to
ensure that switching to Select.Option doesn't have any unintended UI
consequences.
test plan:
- tests pass
qa risk: low
Change-Id: I985fa3742abb59e553d2bf339c532aa2fec47cc2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312112
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
refs LS-3831
flag=none
The production Apollo client uses the IntrospectionFragmentMatcher to
handle unions and interfaces in GraphQL. The MockedProvider that Apollo
provides does not have this matcher used by default, so none of our
tests are using it. This change only applies the matcher to tests that
execute queries against these types as the others do not rely on the
matcher being present.
test plan:
- tests pass
qa risk: low
Change-Id: I527c62b99c56dcdb20de267d1134df3382f7c79d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312009
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I987577ed20e0ecad4378963989393f67539ba9e6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312113
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3831
flag=none
The test(s) previously causing this error have either been fixed or
removed. This supression is no longer necessary.
test plan:
- tests pass
qa risk: low
Change-Id: I4c847bba70a34d13adb7cb7c13b0b04354a1d0df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312109
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>