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

Remove GenericEditionPresenter #9041

Closed
wants to merge 2 commits into from

Conversation

ChrisBAshton
Copy link
Contributor

Re-hashing #8093 to see whether the tests are still reliant on the generic edition presenter. Hoping to add more info to https://trello.com/c/9n7FoudZ/32-whitehall-has-a-genericeditionpresenter.

As part of moving the rendering of content out of Whitehall, we have introduced a Publishing API presenter for each type of document.

We therefore no longer need the GenericEditionPresenter that was being used to send placeholder content items to Publishing API.

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

brucebolt and others added 2 commits May 14, 2024 14:11
As part of moving the rendering of content out of Whitehall, we have
introduced a Publishing API presenter for each type of document.

We therefore no longer need the `GenericEditionPresenter` that was being
used to send placeholder content items to Publishing API.
Otherwise lots of test failures like:

```
Error:
Admin::GenericEditionsController::TranslationTest#test_show_omits_the_link_to_edit_an_existing_translation_unless_the_edition_is_editable:
NoMethodError: undefined method `lead_organisations' for #<GenericEdition id: 163,
```
@ChrisBAshton
Copy link
Contributor Author

Never mind - thought this might be a quick win but it's going to be a rabbit hole. Lots of errors as follows:

Error:
Admin::DocumentCollectionGroupDocumentSearchControllerTest#test_GET_:add_by_title_with_search_value_renders_results_without_pagination_if_length_of_result_is_15:
ActiveRecord::RecordInvalid: Validation failed: Lead organisations at least one required
    test/functional/admin/document_collection_group_document_search_controller_test.rb:95:in `block (2 levels) in <class:DocumentCollectionGroupDocumentSearchControllerTest>'
    test/functional/admin/document_collection_group_document_search_controller_test.rb:95:in `times'
    test/functional/admin/document_collection_group_document_search_controller_test.rb:95:in `block in <class:DocumentCollectionGroupDocumentSearchControllerTest>'

bin/rails test test/functional/admin/document_collection_group_document_search_controller_test.rb:94

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