Page MenuHomeWickedGov Phorge

Revision.js
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

Revision.js

'use strict';
const { action, assert, utils } = require( 'api-testing' );
describe( 'Testing Revisions', () => {
const title = utils.title( 'Revision_' );
const revisions = {};
let alice;
before( async () => {
alice = await action.alice();
const create = await alice.edit( title, { text: 'Creating revision page ...', createonly: true, summary: 'create revision page' } );
revisions.create = create.newrevid;
const revision1 = await alice.edit( title, { text: 'Revision 1', summary: 'revision 1' } );
revisions.rev1 = revision1.newrevid;
const revision2 = await alice.edit( title, { text: 'Revision 2', summary: 'revision 2' } );
revisions.rev2 = revision2.newrevid;
} );
it( 'should get revision history', async () => {
const results = await alice.prop( 'revisions', title, { rvlimit: 5, rvprop: 'ids|user|comment' } );
assert.sameDeepMembers( results[ title ].revisions, [
{ revid: revisions.rev2, parentid: revisions.rev1, user: alice.username, comment: 'revision 2' },
{ revid: revisions.rev1, parentid: revisions.create, user: alice.username, comment: 'revision 1' },
{ revid: revisions.create, parentid: 0, user: alice.username, comment: 'create revision page' }
] );
} );
} );

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 18, 19:42 (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5f/e0/7efdf67a3aee7513ddcae795228f
Default Alt Text
Revision.js (1 KB)

Event Timeline