Selenium: fix 'Page should be editable' test
authorCormac Parle <cparle@wikimedia.org>
Thu, 11 Apr 2019 12:21:42 +0000 (13:21 +0100)
committerZfilipin <zfilipin@wikimedia.org>
Thu, 11 Apr 2019 16:37:58 +0000 (16:37 +0000)
The test is broken only when and targeting beta cluster, because an
extension adds text to page. Instead of checking the entire body of
the page, test just checks if expected string is there.

Bug: T217544
Change-Id: Ibd67790c1df2cd8556b9c71d872d52cfc18f5ebd

tests/selenium/specs/page.js

index 80e12cd..4604ca3 100644 (file)
@@ -80,7 +80,7 @@ describe( 'Page', function () {
 
                // check
                assert.strictEqual( EditPage.heading.getText(), name );
-               assert.strictEqual( EditPage.displayedContent.getText(), editContent );
+               assert( EditPage.displayedContent.getText().match( new RegExp( editContent ) ) );
        } );
 
        it( 'should have history @daily', function () {