From: Cormac Parle Date: Fri, 12 Apr 2019 09:57:46 +0000 (+0100) Subject: selenium: Replace regex matching with includes() X-Git-Tag: 1.34.0-rc.0~1971^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=a45f0e4613657974d340f51cac081297be515160;hp=0fb6bd09b0aa0741316007a6ea1b62ec4518d7b3 selenium: Replace regex matching with includes() Bug: T217544 Change-Id: Iedcbb1f7e21fc768069346ac346c2e499a689556 --- diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js index 4604ca3b78..93e0b87758 100644 --- a/tests/selenium/specs/page.js +++ b/tests/selenium/specs/page.js @@ -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 () {