Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added multiselect and add items to collection in admin #273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vipulnarang95
Copy link

Description

Feature added:
Add items to collection action added for all moderated models in cms_config

Related resources

  • #...
  • #...

Checklist

@vipulnarang95
Copy link
Author

@fsbraun Please check and review

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.05%. Comparing base (79aaae4) to head (9318fc5).
Report is 58 commits behind head on master.

Files Patch % Lines
djangocms_moderation/cms_config.py 90.00% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (79aaae4) and HEAD (9318fc5). Click for more details.

HEAD has 2 uploads less than BASE | Flag | BASE (79aaae4) | HEAD (9318fc5) | |------|------|------| ||12|10|
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   84.19%   79.05%   -5.15%     
==========================================
  Files          23       40      +17     
  Lines        1740     1862     +122     
  Branches      282      260      -22     
==========================================
+ Hits         1465     1472       +7     
- Misses        245      359     +114     
- Partials       30       31       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fsbraun
Copy link
Sponsor Member

fsbraun commented Jun 20, 2024

Looks good. Can you add some tests? What happens if there are published, unpublished or archived objects selected when the action is run?

@fsbraun
Copy link
Sponsor Member

fsbraun commented Jun 20, 2024

Actually, this is a nice example of the power of cms_config.

@vipulnarang95
Copy link
Author

vipulnarang95 commented Jun 20, 2024

@fsbraun Tests are already there: https://github.com/django-cms/djangocms-moderation/blob/master/tests/test_forms.py#L146
Do you want me to add some specific?

@fsbraun
Copy link
Sponsor Member

fsbraun commented Jun 20, 2024

Test adding a mixture of objects with different version states. I would expect a user message that some items could not be added to the collection since they are not drafts, or are locked.

Also, the test should not use the form directly, but add_items_to_collection instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants