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:
Sam Smith 2017-02-02 14:51:01 +00:00 committed by Phuedx
parent 8c96564915
commit ab75283392
2 changed files with 5 additions and 5 deletions

View file

@ -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
};

View file

@ -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( '' );