Skip to content

Adds custom clean and view logic for enforcing only one cover story#2

Open
bomorinid wants to merge 4 commits intomasterfrom
set_coverstory_for_front_page
Open

Adds custom clean and view logic for enforcing only one cover story#2
bomorinid wants to merge 4 commits intomasterfrom
set_coverstory_for_front_page

Conversation

@bomorinid
Copy link
Owner

@bomorinid bomorinid commented Mar 5, 2020

Business requirements

  • CMS user can set only 1 cover story at a time
  • Site visitor sees the cover story in the cover story section of the front page
  • Site visitor sees the three most recent stories excluding the cover story in the top news of the front page, ordered by most recent
  • Site visitor sees all remaining stories in the archive section of the front page, ordered by most recent

Technical context

  • Adds a custom clean to the newspost form to unset previous cover story and set new cover story
  • Adds logic to the front page view that selects the correct story as cover story and organizes the remaining stories by top section or archive section

Manual testing

  • In the CMS, set a news post as the cover story on the news post change form
  • Open the change form a different news post and set it as cover story, and verify that the previous one is no longer set as the cover story
  • On the site front page and verify that they current cover story is displayed as the cover story
  • On the site front page, verify the top stories is the next 3 most recent stories and the archive is all remaining stories
  • Run the CmsPage.test_only_one_cover_story test and it passes

@bomorinid bomorinid closed this Sep 10, 2020
@bomorinid bomorinid deleted the set_coverstory_for_front_page branch September 10, 2020 18:17
@bomorinid bomorinid restored the set_coverstory_for_front_page branch September 10, 2020 18:21
@bomorinid bomorinid reopened this Sep 10, 2020
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.

1 participant