mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
model: extract -> page
In I6bbff6a5 a preview was assigned the "extract" type if it had an extract whereas it should've been assigned the "page" type. Bug: T152004 Change-Id: I5e0cdc8f528647f1e20873753be29c6b85b3a384
This commit is contained in:
parent
8c96564915
commit
ab75283392
|
@ -1,7 +1,7 @@
|
|||
( function ( mw ) {
|
||||
|
||||
var TYPE_GENERIC = 'generic',
|
||||
TYPE_EXTRACT = 'extract';
|
||||
TYPE_PAGE = 'page';
|
||||
|
||||
/**
|
||||
* @typedef {Object} ext.popups.PreviewModel
|
||||
|
@ -24,7 +24,7 @@
|
|||
/**
|
||||
* @constant {String}
|
||||
*/
|
||||
mw.popups.preview.TYPE_EXTRACT = TYPE_EXTRACT;
|
||||
mw.popups.preview.TYPE_PAGE = TYPE_PAGE;
|
||||
|
||||
/**
|
||||
* Creates a preview model.
|
||||
|
@ -52,7 +52,7 @@
|
|||
languageCode: languageCode,
|
||||
languageDirection: languageDirection,
|
||||
extract: processedExtract,
|
||||
type: processedExtract === undefined ? TYPE_GENERIC : TYPE_EXTRACT,
|
||||
type: processedExtract === undefined ? TYPE_GENERIC : TYPE_PAGE,
|
||||
thumbnail: thumbnail
|
||||
};
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
|
||||
assert.strictEqual(
|
||||
model.type,
|
||||
mw.popups.preview.TYPE_EXTRACT,
|
||||
'A non-generic ("extract") preview has an extract.'
|
||||
mw.popups.preview.TYPE_PAGE,
|
||||
'A non-generic ("page") preview has an extract.'
|
||||
);
|
||||
|
||||
model = createModelWithExtract( '' );
|
||||
|
|
Loading…
Reference in a new issue