QA: Two diff pages is enough
Use the more verbose SpecialMobileDiff page Change-Id: I1e773b0a654d2b03601ae8ba37dc8bbc03910e7f
This commit is contained in:
parent
b308c33a74
commit
0540abb30c
|
@ -1,12 +1,12 @@
|
||||||
const assert = require( 'assert' ),
|
const assert = require( 'assert' ),
|
||||||
{ DiffPage } = require( '../support/world.js' );
|
{ SpecialMobileDiffPage } = require( '../support/world.js' );
|
||||||
|
|
||||||
const iShouldSeeAddedContent = ( text ) => {
|
const iShouldSeeAddedContent = ( text ) => {
|
||||||
DiffPage.inserted_content_element.waitForVisible();
|
SpecialMobileDiffPage.inserted_content_element.waitForVisible();
|
||||||
assert.strictEqual( DiffPage.inserted_content_element.getText(), text );
|
assert.strictEqual( SpecialMobileDiffPage.inserted_content_element.getText(), text );
|
||||||
};
|
};
|
||||||
const iShouldSeeRemovedContent = ( text ) => {
|
const iShouldSeeRemovedContent = ( text ) => {
|
||||||
assert.strictEqual( DiffPage.deleted_content_element.getText(), text );
|
assert.strictEqual( SpecialMobileDiffPage.deleted_content_element.getText(), text );
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { iShouldSeeAddedContent, iShouldSeeRemovedContent };
|
module.exports = { iShouldSeeAddedContent, iShouldSeeRemovedContent };
|
||||||
|
|
|
@ -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();
|
|
|
@ -6,6 +6,5 @@ module.exports = {
|
||||||
ArticlePage: require( './article_page' ),
|
ArticlePage: require( './article_page' ),
|
||||||
ArticlePageWithEditorOverlay: require( './article_page_with_editor_overlay' ),
|
ArticlePageWithEditorOverlay: require( './article_page_with_editor_overlay' ),
|
||||||
SpecialHistoryPage: require( './special_history_page' ),
|
SpecialHistoryPage: require( './special_history_page' ),
|
||||||
SpecialMobileDiffPage: require( './special_mobilediff_page' ),
|
SpecialMobileDiffPage: require( './special_mobilediff_page' )
|
||||||
DiffPage: require( './diff_page' )
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,6 +10,8 @@ const { Page } = require( './mw_core_pages' );
|
||||||
|
|
||||||
class SpecialMobileDiffPage extends Page {
|
class SpecialMobileDiffPage extends Page {
|
||||||
|
|
||||||
|
get inserted_content_element() { return $( 'ins' ); }
|
||||||
|
get deleted_content_element() { return $( 'del' ); }
|
||||||
get user_info_element() { return $( '#mw-mf-userinfo' ); }
|
get user_info_element() { return $( '#mw-mf-userinfo' ); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue