selenium: create edit for RecentChanges through GUI
authorPablo Grass <pablo.grass@wikimedia.de>
Fri, 13 Jul 2018 15:18:20 +0000 (17:18 +0200)
committerPablo Grass <pablo.grass@wikimedia.de>
Fri, 13 Jul 2018 15:21:25 +0000 (17:21 +0200)
Use page object to create the page we will be asserting on
Special:RecentChanges. Apparently (post send) jobs are not executed on
API calls (that were formerly used for test setup) and consequently
presence of the edit on Special:RecentChanges could not be guaranteed.

Bug: T199446
Change-Id: I1fd0c49263e975c6b24e2e1f9a072486a6565dda

tests/selenium/specs/specialrecentchanges.js

index 218e67a..ce3ef0d 100644 (file)
@@ -1,5 +1,5 @@
 const assert = require( 'assert' ),
-       Api = require( 'wdio-mediawiki/Api' ),
+       EditPage = require( '../pageobjects/edit.page' ),
        RecentChangesPage = require( '../pageobjects/recentchanges.page' ),
        Util = require( 'wdio-mediawiki/Util' );
 
@@ -13,11 +13,8 @@ describe( 'Special:RecentChanges', function () {
                name = Util.getTestString();
        } );
 
-       // Disabled because flaky (T198137)
-       it.skip( 'shows page creation', function () {
-               browser.call( function () {
-                       return Api.edit( name, content );
-               } );
+       it( 'shows page creation', function () {
+               EditPage.edit( name, content );
 
                RecentChangesPage.open();