Page MenuHomeWickedGov Phorge

ReparseDependentPages.js
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ReparseDependentPages.js

'use strict';
const { action, assert, utils } = require( 'api-testing' );
describe( 'Reparse of dependent pages', () => {
const title = utils.title( 'Reparse_' );
const template = utils.title( 'Template' );
const link = utils.title( 'Link' );
let alice;
before( async () => {
alice = await action.alice();
} );
it( 'should create a page with missing template and link', async () => {
await alice.edit( title, { text: `{{${ template }}} [[${ link }]]`, createonly: true } );
const html = await alice.getHtml( title );
assert.match( html, new RegExp( `title=Template:${ template }&action=edit&redlink=1` ) );
assert.match( html, new RegExp( `title=${ link }&action=edit&redlink=1` ) );
} );
it( 'should create missing template and link', async () => {
await alice.edit( `Template:${ template }`, { text: 'Howdy', createonly: true } );
await alice.edit( link, { text: 'Test link', createonly: true } );
} );
// FIXME: T230211
it.skip( 'should get page with updated template and link', async () => {
const { parse } = await alice.action( 'parse', { page: title } );
assert.notInclude( parse.text[ '*' ], 'redlink=1' );
assert.exists( parse.links[ 0 ].exists );
assert.exists( parse.templates[ 0 ].exists );
} );
} );

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 19, 02:41 (2 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a4/6b/7f2f4796128ba25f04e502152981
Default Alt Text
ReparseDependentPages.js (1 KB)

Event Timeline