From: Ed Sanders Date: Wed, 6 Jun 2018 10:49:33 +0000 (+0100) Subject: Selenium tests: Use assert.strictEqual instead of assert.equal X-Git-Tag: 1.34.0-rc.0~5173^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=4ffbfabf162dbfe6d510a3c99a557968b944d12b;p=lhc%2Fweb%2Fwiklou.git Selenium tests: Use assert.strictEqual instead of assert.equal assert.equal is deprecated Change-Id: I2f83d596db2ad475de5e005baa849782261d433e --- diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js index a1fd4806b7..dfc6fa1ae8 100644 --- a/tests/selenium/specs/page.js +++ b/tests/selenium/specs/page.js @@ -31,8 +31,8 @@ describe( 'Page', function () { EditPage.edit( name, content ); // check - assert.equal( EditPage.heading.getText(), name ); - assert.equal( EditPage.displayedContent.getText(), content ); + assert.strictEqual( EditPage.heading.getText(), name ); + assert.strictEqual( EditPage.displayedContent.getText(), content ); } ); it( 'should be re-creatable', function () { @@ -52,8 +52,8 @@ describe( 'Page', function () { EditPage.edit( name, content ); // check - assert.equal( EditPage.heading.getText(), name ); - assert.equal( EditPage.displayedContent.getText(), content ); + assert.strictEqual( EditPage.heading.getText(), name ); + assert.strictEqual( EditPage.displayedContent.getText(), content ); } ); it( 'should be editable', function () { @@ -66,8 +66,8 @@ describe( 'Page', function () { EditPage.edit( name, content ); // check - assert.equal( EditPage.heading.getText(), name ); - assert.equal( EditPage.displayedContent.getText(), content ); + assert.strictEqual( EditPage.heading.getText(), name ); + assert.strictEqual( EditPage.displayedContent.getText(), content ); } ); it( 'should have history', function () { @@ -78,7 +78,7 @@ describe( 'Page', function () { // check HistoryPage.open( name ); - assert.equal( HistoryPage.comment.getText(), `(Created page with "${content}")` ); + assert.strictEqual( HistoryPage.comment.getText(), `(Created page with "${content}")` ); } ); it( 'should be deletable', function () { @@ -94,7 +94,7 @@ describe( 'Page', function () { DeletePage.delete( name, content + '-deletereason' ); // check - assert.equal( + assert.strictEqual( DeletePage.displayedContent.getText(), '"' + name + '" has been deleted. See deletion log for a record of recent deletions.\nReturn to Main Page.' ); @@ -118,6 +118,6 @@ describe( 'Page', function () { RestorePage.restore( name, content + '-restorereason' ); // check - assert.equal( RestorePage.displayedContent.getText(), name + ' has been restored\nConsult the deletion log for a record of recent deletions and restorations.' ); + assert.strictEqual( RestorePage.displayedContent.getText(), name + ' has been restored\nConsult the deletion log for a record of recent deletions and restorations.' ); } ); } ); diff --git a/tests/selenium/specs/user.js b/tests/selenium/specs/user.js index 10bf05d381..4d22645e09 100644 --- a/tests/selenium/specs/user.js +++ b/tests/selenium/specs/user.js @@ -25,7 +25,7 @@ describe( 'User', function () { CreateAccountPage.createAccount( username, password ); // check - assert.equal( CreateAccountPage.heading.getText(), `Welcome, ${username}!` ); + assert.strictEqual( CreateAccountPage.heading.getText(), `Welcome, ${username}!` ); } ); it( 'should be able to log in', function () { @@ -38,7 +38,7 @@ describe( 'User', function () { UserLoginPage.login( username, password ); // check - assert.equal( UserLoginPage.userPage.getText(), username ); + assert.strictEqual( UserLoginPage.userPage.getText(), username ); } ); it( 'should be able to change preferences', function () { @@ -56,6 +56,6 @@ describe( 'User', function () { PreferencesPage.changeRealName( realName ); // check - assert.equal( PreferencesPage.realName.getValue(), realName ); + assert.strictEqual( PreferencesPage.realName.getValue(), realName ); } ); } ); diff --git a/tests/selenium/wdio-mediawiki/specs/BlankPage.js b/tests/selenium/wdio-mediawiki/specs/BlankPage.js index f84ae90443..8cb46d492b 100644 --- a/tests/selenium/wdio-mediawiki/specs/BlankPage.js +++ b/tests/selenium/wdio-mediawiki/specs/BlankPage.js @@ -6,6 +6,6 @@ describe( 'BlankPage', function () { BlankPage.open(); // check - assert.equal( BlankPage.heading.getText(), 'Blank page' ); + assert.strictEqual( BlankPage.heading.getText(), 'Blank page' ); } ); } );