[MediaWiki-commits] [Gerrit] Fix failing tests - change (mediawiki...MobileFrontend)
Kaldari has submitted this change and it was merged. Change subject: Fix failing tests .. Fix failing tests Bug: 72506 Change-Id: I0b8e9f8e0fbe76740817b620113c10ce1acf83e7 --- M tests/qunit/modules/toggling/test_toggle.js 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Kaldari: Verified; Looks good to me, approved Jdlrobson: Looks good to me, approved diff --git a/tests/qunit/modules/toggling/test_toggle.js b/tests/qunit/modules/toggling/test_toggle.js index 40b4471..0293d8c 100644 --- a/tests/qunit/modules/toggling/test_toggle.js +++ b/tests/qunit/modules/toggling/test_toggle.js @@ -152,6 +152,8 @@ }, teardown: function() { window.location.hash = "#"; + M.settings.deleteUserSetting('expandSections', true); + M.settings.deleteUserSetting( 'expandedSections', false ); } } ); @@ -186,6 +188,9 @@ QUnit.module( 'MobileFrontend toggle.js: remember expanded sections', { setup: function() { + this.sandbox.stub( mw.config, 'get' ).withArgs( 'wgMFCollapseSectionsByDefault' ).returns( true ); + this.sandbox.stub( M, 'isBetaGroupMember' ).returns( true ); + this.sandbox.stub( M, 'isWideScreen' ).returns( false ); this.$container = $( '' ).html( sectionHtml ); toggle.enable( this.$container ); this.$section = this.$container.find( 'h2' ); @@ -196,6 +201,7 @@ teardown: function() { window.location.hash = "#"; M.settings.deleteUserSetting( 'expandedSections', false ); + M.settings.deleteUserSetting('expandSections', true); } } ); @@ -280,6 +286,9 @@ QUnit.module( 'MobileFrontend toggle.js: restore expanded sections', { setup: function() { + this.sandbox.stub( mw.config, 'get' ).withArgs( 'wgMFCollapseSectionsByDefault' ).returns( true ); + this.sandbox.stub( M, 'isBetaGroupMember' ).returns( true ); + this.sandbox.stub( M, 'isWideScreen' ).returns( false ); this.$container = $( '' ).html( sectionHtml ); // Restore expanded sections only works on headings that are also section headings this.$container.find( 'h2' ).addClass( 'section-heading' ); @@ -291,6 +300,7 @@ teardown: function() { window.location.hash = "#"; M.settings.deleteUserSetting( 'expandedSections', false ); + M.settings.deleteUserSetting('expandSections', true); } } ); -- To view, visit https://gerrit.wikimedia.org/r/169020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b8e9f8e0fbe76740817b620113c10ce1acf83e7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov Gerrit-Reviewer: Awjrichards Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Kaldari Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix failing tests - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/169020 Change subject: fix failing tests .. fix failing tests Change-Id: I0b8e9f8e0fbe76740817b620113c10ce1acf83e7 --- M tests/qunit/modules/toggling/test_toggle.js 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/20/169020/1 diff --git a/tests/qunit/modules/toggling/test_toggle.js b/tests/qunit/modules/toggling/test_toggle.js index 40b4471..0293d8c 100644 --- a/tests/qunit/modules/toggling/test_toggle.js +++ b/tests/qunit/modules/toggling/test_toggle.js @@ -152,6 +152,8 @@ }, teardown: function() { window.location.hash = "#"; + M.settings.deleteUserSetting('expandSections', true); + M.settings.deleteUserSetting( 'expandedSections', false ); } } ); @@ -186,6 +188,9 @@ QUnit.module( 'MobileFrontend toggle.js: remember expanded sections', { setup: function() { + this.sandbox.stub( mw.config, 'get' ).withArgs( 'wgMFCollapseSectionsByDefault' ).returns( true ); + this.sandbox.stub( M, 'isBetaGroupMember' ).returns( true ); + this.sandbox.stub( M, 'isWideScreen' ).returns( false ); this.$container = $( '' ).html( sectionHtml ); toggle.enable( this.$container ); this.$section = this.$container.find( 'h2' ); @@ -196,6 +201,7 @@ teardown: function() { window.location.hash = "#"; M.settings.deleteUserSetting( 'expandedSections', false ); + M.settings.deleteUserSetting('expandSections', true); } } ); @@ -280,6 +286,9 @@ QUnit.module( 'MobileFrontend toggle.js: restore expanded sections', { setup: function() { + this.sandbox.stub( mw.config, 'get' ).withArgs( 'wgMFCollapseSectionsByDefault' ).returns( true ); + this.sandbox.stub( M, 'isBetaGroupMember' ).returns( true ); + this.sandbox.stub( M, 'isWideScreen' ).returns( false ); this.$container = $( '' ).html( sectionHtml ); // Restore expanded sections only works on headings that are also section headings this.$container.find( 'h2' ).addClass( 'section-heading' ); @@ -291,6 +300,7 @@ teardown: function() { window.location.hash = "#"; M.settings.deleteUserSetting( 'expandedSections', false ); + M.settings.deleteUserSetting('expandSections', true); } } ); -- To view, visit https://gerrit.wikimedia.org/r/169020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b8e9f8e0fbe76740817b620113c10ce1acf83e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix failing tests - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix failing tests .. Fix failing tests Change-Id: I58baf0e4c61796b53bd847cf4a223989e0e3ab8b --- M tests/MobileContextTest.php M tests/modules/MFResourceLoaderModuleTest.php 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: MaxSem: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/tests/MobileContextTest.php b/tests/MobileContextTest.php index 34c8bd1..56df914 100644 --- a/tests/MobileContextTest.php +++ b/tests/MobileContextTest.php @@ -240,7 +240,7 @@ public function getXDeviceInVaryModeProvider() { return array( - array( 'webkit', 'no', 'capable' ), + array( 'webkit', 'no', 'webkit' ), array( 'capable', 'no', 'capable' ), array( 'wap', 'yes', 'wap' ), ); diff --git a/tests/modules/MFResourceLoaderModuleTest.php b/tests/modules/MFResourceLoaderModuleTest.php index 8aff7d2..c63e3c4 100644 --- a/tests/modules/MFResourceLoaderModuleTest.php +++ b/tests/modules/MFResourceLoaderModuleTest.php @@ -96,8 +96,8 @@ ), array( $module, - 'mw.mobileFrontend.template.add("template", "hello\n");' . "\n" . - 'mw.mobileFrontend.template.add("template2", "goodbye\n");' . "\n" + 'mw.mobileFrontend.template.add("template","hello\n");' . + 'mw.mobileFrontend.template.add("template2","goodbye\n");' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/57022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58baf0e4c61796b53bd847cf4a223989e0e3ab8b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: awjrichards Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix failing tests - change (mediawiki...MobileFrontend)
awjrichards has uploaded a new change for review. https://gerrit.wikimedia.org/r/57022 Change subject: Fix failing tests .. Fix failing tests Change-Id: I58baf0e4c61796b53bd847cf4a223989e0e3ab8b --- M tests/MobileContextTest.php M tests/modules/MFResourceLoaderModuleTest.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/22/57022/1 diff --git a/tests/MobileContextTest.php b/tests/MobileContextTest.php index 34c8bd1..56df914 100644 --- a/tests/MobileContextTest.php +++ b/tests/MobileContextTest.php @@ -240,7 +240,7 @@ public function getXDeviceInVaryModeProvider() { return array( - array( 'webkit', 'no', 'capable' ), + array( 'webkit', 'no', 'webkit' ), array( 'capable', 'no', 'capable' ), array( 'wap', 'yes', 'wap' ), ); diff --git a/tests/modules/MFResourceLoaderModuleTest.php b/tests/modules/MFResourceLoaderModuleTest.php index 8aff7d2..c63e3c4 100644 --- a/tests/modules/MFResourceLoaderModuleTest.php +++ b/tests/modules/MFResourceLoaderModuleTest.php @@ -96,8 +96,8 @@ ), array( $module, - 'mw.mobileFrontend.template.add("template", "hello\n");' . "\n" . - 'mw.mobileFrontend.template.add("template2", "goodbye\n");' . "\n" + 'mw.mobileFrontend.template.add("template","hello\n");' . + 'mw.mobileFrontend.template.add("template2","goodbye\n");' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/57022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58baf0e4c61796b53bd847cf4a223989e0e3ab8b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: awjrichards ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits