User:Tgr (WMF)/DifferenceEngine/test plan

High priority

 * (probably should be tested before merging)


 * display diff page by going into page history and using the "Compare selected revisions" button
 * should have title, headers (two blocks with links to revisions, undo/edit links, user etc), diff, the HTML view of the right-hand version - compare with a diff in production
 * should have warning below the headers iff the revisions are not direct neighbors
 * the actual diff rendering logic was not touched, no
 * test that the right revisions get diffed when giving the parameters in various ways (mostly the same code path - no need to check all details, just verify that the right revisions are diffed):
 * "cur" link in page history"
 * prev link in page history
 * try non-existing revision id for the oldid and diff parameters (already somewhat broken - T201218)
 * test with left, right, both revision hidden from the user
 * test diff ("view changes") when editing a page
 * try for page creation, and when editing an existing page
 * (also with VisualEditor? No idea if that should work, probably depends on T191795)
 * test edit conflict diff (edit concurrently with two different users to trigger)
 * also with multi-slot diff
 * test diff on Special:Undelete (between two live, one live and one deleted, two deleted revisions)

Multi-Slot

 * create some multi-content revision (see below)
 * test diffs with multiple slots
 * test diff where some slot only exists on the left/right side
 * (the rendered HTML will only show the main slot; this is OK)
 * test multi-slot diff in mobile view (with MobileFrontend)
 * multiple slots should display sanely
 * test multi-slot diff where main slot is Wikibase
 * multiple slots should display sanely
 * header should have a "restore" link
 * diff should reflect user language

Medium priority

 * (probably fine to test post-merge on Beta)


 * test multi-content diff where some slot is not text (e.g. Wikibase, see below for creating EntityContent objects)
 * test diff shown after rollback
 * test Special:ComparePages
 * Extension:Translate? (has lots of entry points, hook calls etc. for diff; I don't know it well enough to tell how to trigger them or whether they are important, though)

Low priority

 * (probably OK not to test)


 * test with left, right, both ID invalid (also with diff=prev/next when there is no prev/next revision)
 * test other diff engines (set  to ,   (needs the   vagrant module) (is there a way to test the external executable path?)
 * test revision selection when ids are swapped in the URL
 * test with left, right, both revision hidden when the user has permission to see it
 * test with left, right, both revision suppressed when the user does / does not have permission to see it
 * ProofreadPage index/page diffs
 * diffto/difftotext parameters to prop=revisions API
 * recent changes RSS feed
 * test FlaggedRevs diff (where page has a non-current stable version) with diff=review (should make diff between current and stable revision)
 * other Wikimedia-deployed DifferenceEngine subclasses: JsonConfig, MassMessage, Newsletter
 * other Wikimedia-deployed DifferenceEngine callers: AbuseFilter (filter diff), Flow (diffs + undo)
 * other Wikimedia-deployed DifferenceEngine hook implementers: RevisionSlider (???), Thanks (thank link in header),

Creating test revisions
Set, run   (to convert existing revisions to the new schema), then use   and run something like

To create Wikibase EntityContent, on a wiki that has the WikibaseRepo extension enabled:

Note that Wikibase entities may not render correctly when forced into pages that do not belong to an entity namespace. Also note that ItemIds that do not match the page title may cause some confusion, since this breaks basic assumptions made by Wikibase. Bu for showing diffs, this should be fine.

To directly create and Item page on a wiki that has the WikibaseRepo extension enabled, use Special:NewItem.