mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 02:55:04 +00:00
Specify document base URLs in more test cases
Depends-On: I0e301bef38d97fa2234aa901c787360d9fbde8a3 Change-Id: I07a8c097dba0f5572c0aedf4febdf1434063ea6f
This commit is contained in:
parent
30d02d99ac
commit
a845923a65
|
@ -12,7 +12,11 @@ QUnit.test( 'getModelFromDom', function ( assert ) {
|
|||
|
||||
for ( var msg in cases ) {
|
||||
var caseItem = ve.copy( cases[ msg ] );
|
||||
// TODO: Cite tests contain unsecaped < in attrs, handle this upstream somehow
|
||||
caseItem.base = ve.dm.citeExample.baseUri;
|
||||
caseItem.mwConfig = {
|
||||
wgArticlePath: '/wiki/$1'
|
||||
};
|
||||
// TODO: Cite tests contain unescaped < in attrs, handle this upstream somehow
|
||||
caseItem.ignoreXmlWarnings = true;
|
||||
if ( caseItem.mwConfig ) {
|
||||
mw.config.set( caseItem.mwConfig );
|
||||
|
@ -27,7 +31,11 @@ QUnit.test( 'getDomFromModel', function ( assert ) {
|
|||
|
||||
for ( var msg in cases ) {
|
||||
var caseItem = ve.copy( cases[ msg ] );
|
||||
// TODO: Cite tests contain unsecaped < in attrs, handle this upstream somehow
|
||||
caseItem.base = ve.dm.citeExample.baseUri;
|
||||
caseItem.mwConfig = {
|
||||
wgArticlePath: '/wiki/$1'
|
||||
};
|
||||
// TODO: Cite tests contain unescaped < in attrs, handle this upstream somehow
|
||||
caseItem.ignoreXmlWarnings = true;
|
||||
if ( caseItem.mwConfig ) {
|
||||
mw.config.set( caseItem.mwConfig );
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
|
||||
ve.dm.citeExample = {};
|
||||
|
||||
ve.dm.citeExample.createExampleDocument = function ( name, store ) {
|
||||
return ve.dm.example.createExampleDocumentFromObject( name, store, ve.dm.citeExample );
|
||||
ve.dm.citeExample.baseUri = 'http://example.com/wiki/';
|
||||
|
||||
ve.dm.citeExample.createExampleDocument = function ( name, store, base ) {
|
||||
return ve.dm.example.createExampleDocumentFromObject( name, store, ve.dm.citeExample, base || ve.dm.citeExample.baseUri );
|
||||
};
|
||||
|
||||
ve.dm.citeExample.refListItemClipboard = function ( text ) {
|
||||
|
@ -158,7 +160,6 @@ ve.dm.citeExample.domToDataCases = {
|
|||
'</li>' +
|
||||
'</ol>' +
|
||||
'</div>',
|
||||
head: '<base href="http://example.com/wiki/" />',
|
||||
data: [
|
||||
{ type: 'paragraph' },
|
||||
'F', 'o', 'o',
|
||||
|
@ -376,7 +377,6 @@ ve.dm.citeExample.domToDataCases = {
|
|||
'<a style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a>' +
|
||||
'</sup>' +
|
||||
'</p>',
|
||||
head: '<base href="http://example.com/wiki/" />',
|
||||
data: [
|
||||
{ type: 'paragraph' },
|
||||
'F', 'o', 'o',
|
||||
|
@ -469,7 +469,6 @@ ve.dm.citeExample.domToDataCases = {
|
|||
'{"html":"Foo<!-- bar -->"},"name":"ref"}" ' +
|
||||
' class="mw-ref reference">' +
|
||||
'<a style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>',
|
||||
head: '<base href="http://example.com/wiki/" />',
|
||||
data: [
|
||||
{ type: 'paragraph' },
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue