QA: Two diff pages is enough

Use the more verbose SpecialMobileDiff page

Change-Id: I1e773b0a654d2b03601ae8ba37dc8bbc03910e7f
This commit is contained in:
jdlrobson 2019-04-11 13:24:16 -07:00 committed by Jdlrobson
parent b308c33a74
commit 0540abb30c
4 changed files with 7 additions and 23 deletions

View file

@ -1,12 +1,12 @@
const assert = require( 'assert' ),
{ DiffPage } = require( '../support/world.js' );
{ SpecialMobileDiffPage } = require( '../support/world.js' );
const iShouldSeeAddedContent = ( text ) => {
DiffPage.inserted_content_element.waitForVisible();
assert.strictEqual( DiffPage.inserted_content_element.getText(), text );
SpecialMobileDiffPage.inserted_content_element.waitForVisible();
assert.strictEqual( SpecialMobileDiffPage.inserted_content_element.getText(), text );
};
const iShouldSeeRemovedContent = ( text ) => {
assert.strictEqual( DiffPage.deleted_content_element.getText(), text );
assert.strictEqual( SpecialMobileDiffPage.deleted_content_element.getText(), text );
};
module.exports = { iShouldSeeAddedContent, iShouldSeeRemovedContent };

View file

@ -1,17 +0,0 @@
/**
* Represents a page showing the difference between two revisions
*
* @extends Page
* @example
* https://en.m.wikipedia.org/w/index.php?title=Barack_Obama&type=revision&diff=833886807&oldid=833885770&diffmode=source
*/
const { Page } = require( './mw_core_pages' );
class DiffPage extends Page {
get inserted_content_element() { return $( 'ins' ); }
get deleted_content_element() { return $( 'del' ); }
}
module.exports = new DiffPage();

View file

@ -6,6 +6,5 @@ module.exports = {
ArticlePage: require( './article_page' ),
ArticlePageWithEditorOverlay: require( './article_page_with_editor_overlay' ),
SpecialHistoryPage: require( './special_history_page' ),
SpecialMobileDiffPage: require( './special_mobilediff_page' ),
DiffPage: require( './diff_page' )
SpecialMobileDiffPage: require( './special_mobilediff_page' )
};

View file

@ -10,6 +10,8 @@ const { Page } = require( './mw_core_pages' );
class SpecialMobileDiffPage extends Page {
get inserted_content_element() { return $( 'ins' ); }
get deleted_content_element() { return $( 'del' ); }
get user_info_element() { return $( '#mw-mf-userinfo' ); }
}