Compare two revisions from the history, as a person does: the older one as the first, the newer one as the second, then "Compare selected revisions".
Examples
When I compare the revisions "First version" and "Second version"
When we compare the revisions "First version" and "Undid revision"
And I compare the revisions "Second version" and "Third version"
When I compare the revisions "First version" and "Third version"
When we compare the revisions "Second version" and "First version"
Pattern
When(/^(I |we )*compare the revisions "([^"]*)" and "([^"]*)"$/, …)
Part of @webship-js/mediawiki-steps (github.com/webship/mediawiki-steps), a step pack for Webship-js 2.0.x.