openedx / frontend-lib-content-components

[Moved to openedx/frontend-app-course-authoring] A library of high-level components for content handling (viewing, editing, etc. of HTML, video, problems, etc.), to be shared by multiple MFEs.
GNU Affero General Public License v3.0
11 stars 33 forks source link

fix: text editor opening blank with no images #492

Closed KristinAoki closed 4 months ago

KristinAoki commented 4 months ago

Description

This PR fixes issues the following issues introduced by #490:

Testing

Testing raw editor

  1. Open an existing raw html block
  2. Confirm that the html loads
  3. Add an image using the "Studio URL"
  4. Add an image using the "Web URL"
  5. Click "Save"
  6. Confirm that the images are viewable on the unit page
  7. Re-open the block
  8. Confirm the image srcs are the same as originally saved
  9. Click "Save"
  10. Confirm that the images are still viewable
  11. Add a new raw html block
  12. Confirm that the default content loads

Testing text editor

  1. Open an existing html block with no images
  2. Confirm that text loads
  3. Click "Cancel"
  4. Open an existing html block with images
  5. Confirm that the text and images load
  6. Click "Save"
  7. Confirm that the images load in block preview on the unit page
  8. Add a new text block
  9. Confirm that the editor loads

Testing problem editor

  1. Open an existing problem block with no images
  2. Confirm that problem loads
  3. Click "Cancel"
  4. Open an problem html block with images
  5. Confirm that the problem and images load
  6. Switch to the advanced editor
  7. Confirm that all relative paths are use /static/
  8. Click "Save"
  9. Confirm that the images load in block preview on the unit page
  10. Add a new problem block
  11. Select any of the basic problems
  12. Confirm that the editor loads
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 95.83333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.98%. Comparing base (2678234) to head (8d23e17). Report is 1 commits behind head on main.

Files Patch % Lines
...rc/editors/sharedComponents/TinyMceWidget/hooks.js 94.44% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #492 +/- ## ========================================== + Coverage 88.86% 88.98% +0.11% ========================================== Files 248 248 Lines 4535 4547 +12 Branches 934 941 +7 ========================================== + Hits 4030 4046 +16 + Misses 474 468 -6 - Partials 31 33 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.