jenkins-bot has submitted this change and it was merged.
Change subject: Stop running toggling tests in alpha environment
......................................................................
Stop running toggling tests in alpha environment
Toggling tests should be able to run outside alpha mode
This is needed for moving to the standard CI qunit test job
Bug: T104362
Change-Id: Id118f286d5696076caca91734f18d4a98e0c1412
---
M includes/MobileFrontend.hooks.php
M tests/qunit/mobile.toggling/test_init.js
2 files changed, 5 insertions(+), 2 deletions(-)
Approvals:
Bmansurov: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/MobileFrontend.hooks.php
b/includes/MobileFrontend.hooks.php
index 72c8c20..7090135 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -109,7 +109,7 @@
$name = $context->getTitle()->getDBkey();
$inTestMode =
$name === SpecialPage::getTitleFor( 'JavaScriptTest',
'qunit' )->getDBkey();
- if ( ( $mobileContext->isAlphaGroupMember() || $inTestMode ) &&
+ if ( $mobileContext->isAlphaGroupMember() &&
class_exists( $alphaSkinName ) ) {
$skinName = $alphaSkinName;
} elseif ( $mobileContext->isBetaGroupMember() && class_exists(
$betaSkinName ) ) {
diff --git a/tests/qunit/mobile.toggling/test_init.js
b/tests/qunit/mobile.toggling/test_init.js
index 454578a..4a12ad7 100644
--- a/tests/qunit/mobile.toggling/test_init.js
+++ b/tests/qunit/mobile.toggling/test_init.js
@@ -12,6 +12,7 @@
**/
QUnit.module( 'MobileFrontend toggle.js: Mobile mode.', {
setup: function () {
+ this.sandbox.stub( mw.config, 'get' ).withArgs(
'wgMFCollapseSectionsByDefault' ).returns( true );
this.$container = $( '<div>' ).html( sectionHtml );
this.$section0 = this.$container.find( 'h2' ).eq( 0 );
this.sandbox.stub( browser, 'isWideScreen' ).returns(
false );
@@ -119,6 +120,7 @@
QUnit.module( 'MobileFrontend toggle.js: user setting', {
setup: function () {
+ this.sandbox.stub( mw.config, 'get' ).withArgs(
'wgMFCollapseSectionsByDefault' ).returns( false );
settings.save( 'expandSections', 'true', true );
this.$container = $( '<div>' ).html( sectionHtml );
toggle.enable( this.$container );
@@ -130,7 +132,7 @@
}
} );
- QUnit.test( 'Open by default', 1, function ( assert ) {
+ QUnit.test( 'Open by default 2', 1, function ( assert ) {
assert.strictEqual( this.$container.find( '.collapsible-block'
).eq( 1 ).hasClass( 'open-block' ), true, 'check section is visible at start' );
} );
@@ -142,6 +144,7 @@
QUnit.module( 'MobileFrontend toggle.js: accessibility', {
setup: function () {
+ this.sandbox.stub( mw.config, 'get' ).withArgs(
'wgMFCollapseSectionsByDefault' ).returns( true );
this.$container = $( '<div>' ).html( sectionHtml );
this.sandbox.stub( browser, 'isWideScreen' ).returns(
false );
toggle.enable( this.$container );
--
To view, visit https://gerrit.wikimedia.org/r/226448
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id118f286d5696076caca91734f18d4a98e0c1412
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: BarryTheBrowserTestBot <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Frankiebot <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits