selenium: Replace regex matching with includes()
authorCormac Parle <cparle@wikimedia.org>
Fri, 12 Apr 2019 09:57:46 +0000 (10:57 +0100)
committerKrinkle <krinklemail@gmail.com>
Mon, 15 Apr 2019 17:09:12 +0000 (17:09 +0000)
Bug: T217544
Change-Id: Iedcbb1f7e21fc768069346ac346c2e499a689556

tests/selenium/specs/page.js

index 4604ca3..93e0b87 100644 (file)
@@ -80,7 +80,8 @@ describe( 'Page', function () {
 
                // check
                assert.strictEqual( EditPage.heading.getText(), name );
-               assert( EditPage.displayedContent.getText().match( new RegExp( editContent ) ) );
+               // eslint-disable-next-line no-restricted-syntax
+               assert( EditPage.displayedContent.getText().includes( editContent ) );
        } );
 
        it( 'should have history @daily', function () {