Update canvas_link_migrator

fixes RCX-2117
flag=none

Test Plan:

- In rich content, have an iframe with a src
- src should point to a non-media document
* ex <iframe src="/courses/1/files/3/download">
- Export the course
- Import package into new course
* Url migrates properly
* iframe with a media src still migrates properly

Change-Id: I2404e5a68817236bbaf2f0db75623e6d9465f68b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353387
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
This commit is contained in:
Jacob DeWar 2024-07-24 07:58:22 -04:00
parent c6b72b859e
commit 1c02a5b9a4
3 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ gem "bigdecimal", "~> 3.1"
gem "browser", "~> 5.3", require: false
gem "business_time", "0.13.0"
gem "canvas_connect", "0.3.16"
gem "canvas_link_migrator", "~> 1.0.12"
gem "canvas_link_migrator", "~> 1.0.13"
gem "canvas_webex", "0.18.2"
gem "cld", "~> 0.13"
gem "crocodoc-ruby", "0.0.1", require: false

View File

@ -462,7 +462,7 @@ GEM
canvas_connect (0.3.16)
adobe_connect (~> 1.0.0)
rake (>= 0.9.6)
canvas_link_migrator (1.0.12)
canvas_link_migrator (1.0.13)
activesupport
addressable
nokogiri
@ -1252,7 +1252,7 @@ DEPENDENCIES
canvas_ext!
canvas_http!
canvas_kaltura!
canvas_link_migrator (~> 1.0.12)
canvas_link_migrator (~> 1.0.13)
canvas_mimetype_fu!
canvas_panda_pub!
canvas_partman!

View File

@ -954,7 +954,7 @@ describe ContentMigration do
@copy_from.wiki_pages.create!(title: "page", body: <<~HTML.strip)
undefined data-media-id: <iframe style="width: 400px; height: 225px; display: inline-block;" title="this is a media comment" data-media-type="video" data-media-id="undefined" allowfullscreen="allowfullscreen" allow="fullscreen" src="/media_objects_iframe/m-index0?type=video&amp;embedded=true"></iframe>
no data-media-id: <iframe style="width: 400px; height: 225px; display: inline-block;" title="this is a media comment" allowfullscreen="allowfullscreen" allow="fullscreen" src="/media_objects_iframe/m-index1?type=video&amp;embedded=true"></iframe>
no data-media-id: <iframe style="width: 400px; height: 225px; display: inline-block;" title="this is a media comment" data-media-type="video" allowfullscreen="allowfullscreen" allow="fullscreen" src="/media_objects_iframe/m-index1?type=video&amp;embedded=true"></iframe>
HTML
run_course_copy
@ -964,7 +964,7 @@ describe ContentMigration do
translated_body = <<~HTML.strip
undefined data-media-id: <iframe style="width: 400px; height: 225px; display: inline-block;" title="this is a media comment" data-media-type="video" data-media-id="m-index0" allowfullscreen="allowfullscreen" allow="fullscreen" src="/media_attachments_iframe/#{file0.id}?embedded=true&amp;type=video"></iframe>
no data-media-id: <iframe style="width: 400px; height: 225px; display: inline-block;" title="this is a media comment" allowfullscreen="allowfullscreen" allow="fullscreen" src="/media_attachments_iframe/#{file1.id}?embedded=true" data-media-id="m-index1"></iframe>
no data-media-id: <iframe style="width: 400px; height: 225px; display: inline-block;" title="this is a media comment" data-media-type="video" allowfullscreen="allowfullscreen" allow="fullscreen" src="/media_attachments_iframe/#{file1.id}?embedded=true&amp;type=video" data-media-id="m-index1"></iframe>
HTML
expect(@copy_to.wiki_pages.take.body).to eq translated_body
end