django-cms / djangocms-text-ckeditor

Text Plugin for django CMS using CKEditor 4
https://www.django-cms.org/en/repositories-plugins/
BSD 3-Clause "New" or "Revised" License
167 stars 185 forks source link

Support djangocms-picture 2.0.0 and higher in create_picture_plugin #660

Closed leture closed 10 months ago

leture commented 10 months ago

djangocms-picture 2.0.0 switched to a filer reference to store the image so the helper must create a filer image instance

Refs #642

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2e463bf) 76.36% compared to head (5b02c31) 81.79%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #660 +/- ## ========================================== + Coverage 76.36% 81.79% +5.43% ========================================== Files 20 20 Lines 918 912 -6 Branches 123 122 -1 ========================================== + Hits 701 746 +45 + Misses 191 138 -53 - Partials 26 28 +2 ```

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

fsbraun commented 10 months ago

@leture Do you think you can cover this in a test?

leture commented 10 months ago

@fsbraun Because of the lack of an existing test to just adjust I wrote a test for the helper extract_images which subsequently also tests create_picture_plugin. This seemed to be more worthwhile than just a direct call to create_picture_plugin. So it is tested that the image extraction logic is actually executed on a text plugin save.

leture commented 10 months ago

@fsbraun I am finished here.