Skip to content

Conversation

@ASalbenblatt
Copy link

Issue

https://otwarchive.atlassian.net/browse/AO3-4031

Purpose

This adds the top of the page warning about the draft soon being deleted to drafts with multiple chapters. Before this change, there was a bug where only single chapter drafts would display the message.

Testing Instructions

Log in
  1. Post > New Work
  2. Fill in the required fields
  3. Press “Save Draft”
  4. Press “Save Draft”
  5. Press “Add Chapter”
  6. Fill in some chapter text
  7. Press “Save Draft”
  8. There should now be a message at the top of the work page reading: "This work is a draft and has not been posted. The draft will be scheduled for deletion on [DATE]."
  9. Post a chapter
  10. That message should not be present on any of the chapter pages, even those that are still drafts

Credit

FlyingFalcon they/them

This adds the top of the page warning about the draft soon being deleted to drafts with multiple chapters.
Copy link
Member

@marcus8448 marcus8448 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! In accordance with our coding standards, could you also add an automated integration test to check for the notice on a chapter?

I also see that the three notices are identical between works and chapters. If you're up to it, it would be nice to put the notices together in a partial so that they can be shared. This is beyond the scope of the original issue, so feel free to just add a test and I'll open up a separate ticket for the partial.

@ASalbenblatt
Copy link
Author

I just added the test, and I don't know how partials work, so you can just open a new ticket for it.

Then I should see "This chapter is a draft and hasn't been posted yet!"
And I should see "Sorry, you can't comment on a draft."

Scenario: Creating a multichapter draft
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "A user should see a deletion warning message on a multichapter draft" or something similar, just so that the focus is on the warning being there.

@ASalbenblatt
Copy link
Author

Does that look good?

Copy link
Member

@marcus8448 marcus8448 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, looks great! Thanks again for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants