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

Popular links delete #2276

Merged
merged 7 commits into from
Aug 14, 2024
Merged

Popular links delete #2276

merged 7 commits into from
Aug 14, 2024

Commits on Aug 8, 2024

  1. Outline for destroy method and link

    Add delete functionality and confirm destroy method
    Functional and integration tests added for delete mechanism
    Routes for 'confirm delete' page and actual destroy action
    Helen.Pickavance authored and ellohez committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    30c8e11 View commit details
    Browse the repository at this point in the history
  2. Confirmation page created - removed delete page and links

    Destroy and confirm destroy functionality
    PopularLinksEdition.can_delete? method to test if edition can be deleted
    Tests for confirmation page and cancel delete
    ellohez committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    833943a View commit details
    Browse the repository at this point in the history
  3. Destroy tests added and extracted error message out

    Tests for:
     Show previously published edition
     Successful and unsuccessful delete from DB
    
    Application error message was being used twice, so extracted out to own method.
    ellohez committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    256da1b View commit details
    Browse the repository at this point in the history
  4. Add check if the edition can be deleted before deletion

    Added an extra check to ensure that there is no way to delete a published edition.
    To prevent issues with multiple users accessing the same edition.
    ellohez committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    8445f5c View commit details
    Browse the repository at this point in the history
  5. Desk check changes - messages and labels made more consistent

    Link renamed to 'Delete draft'
    Application error message makes it clear that it was a draft that failed to be deleted not an edition
    'Can't delete published edition' message updated to be more helpful
    Confirmation and success messages reworded to be clear it is a draft that will be/has been deleted
    ellohez committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    87a1eaf View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. PR Quick fixes, test title, removed incorrect content block and renam…

    …e of error message method
    
    Fixed incorrect test title
    Fixup! Add missing test and extracted error message method
    Rename of error message method
    Removed content block that doesn't exist in mainstream
    ellohez committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    f0d6ace View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. PR - Test improvements and fixes

    Improved test - more descriptive name and added assert for the error message
    Test improvements - more accurate names and extra assert
    Renamed tests to more explanatory names
    Added test to check alert and redirect if delete from DB fails with an exception
    Divided tests into 3 contexts - 'draft', 'published' and 'database errors'
    Moved context blocks 'destroy' and 'confirm destroy' to after 'publish'
    Moved the test for deletion failure to #destroy #draft context block
    Added redirect assert to test for can't delete published edition
    ellohez committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    1681ad9 View commit details
    Browse the repository at this point in the history