RevisionDelete is "Change visibility of selected revisions". The scenarios/test areas only involve this if specifically stated.
Test areas
- Straight deletion
- Straight undeletion
- [RevisionDelete] Revision deletion
- [RevisionDelete] Revision undeletion attempting to change the content model.
- Page recreation
- Attempting to undelete a Flow board on top of a non-Flow page (possibly due to recreation; see above)
- T104591: Deleted wikitext Talk page cannot be restored after EnableFlow creates the same page (block EnableFlow in this case?)
Test plans
- Create wikitext -> Delete wikitext page -> Enable Flow -> Delete Flow board -> Restore only wikitext revision with checkbox -> Restore Flow with checkbox
- Create as Flow -> Delete Flow -> Create as wikitext -> Delete wikitext -> Create as wikitext -> Undelete both together (since the top-level page after restoration is wikitext, you have to query flow_workflow on workflow_namespace and workflow_title_text to see if the workflow_page_id matches the restored page)
- After the one immediately above, delete all revisions, undelete Flow board.
- Create wikitext -> delete wikitext -> create Flow -> delete Flow -> restore both together
- Create wikitext page -> delete wikitext page -> undelete deleted wikitext page -> deleted undeleted wikitext page again -> create new Flow page where wikitext page was ->undelete wikitext page where Flow page is now -> delete all revisions -> undelete wikitext.
- Create Flow page -> delete Flow page -> undelete deleted Flow page -> deleted undeleted Flow page again -> create new wikitext page where Flow page was ->undelete Flow page where wikitext page is now -> delete all revisions -> undelete Flow
- Create wikitext -> delete wikitext -> create Flow -> restore wikitext (T104591: Deleted wikitext Talk page cannot be restored after EnableFlow creates the same page)
- [RevisionDelete] Create wikitext page -> delete page -> create Flow board -> delete page -> hide Flow revision using RevisionDelete -> unhide Flow revision using RevisionDelete -> undelete Flow revision
- [RevisionDelete] Create Flow board -> delete page -> create wikitext page -> undelete Flow board -> hide Flow revision using RevisionDelete -> delete page -> undelete only Flow revision
- With "Remove restrictions on restored revisions" unchecked (should fail)
- With "Remove restrictions on restored revisions" checked (should work and show only Flow)
- Create Flow, delete Flow, create Flow with EnableFlow. Go to undelete screen, click the timestamp to go to the board, and try to post. Restore the old Flow board. Get revision ID of revision.rev_id for old board (from DB or api.php prop=revisions). Add ?oldid=123 to the URL, but replacing 123 with the revision ID from before. Try to post to the board.
- Etc.
It's okay to reject some of these operations (e.g. revision deletion) as long as we end up in a consistent state.
After these scenarios are developed, they should be tested and issues fixed as part of T122262: Improve Flow deletion/undeletion resilience.