Phuedx has uploaded a new change for review.
https://gerrit.wikimedia.org/r/172551
Change subject: Open up the WikiGrok A/B to alpha
......................................................................
Open up the WikiGrok A/B to alpha
Change-Id: I190716d7f68af9c8407b467399198173eddbab82
---
M javascripts/modules/wikigrok/WikiGrokAbTest.js
M tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
2 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/51/172551/1
diff --git a/javascripts/modules/wikigrok/WikiGrokAbTest.js
b/javascripts/modules/wikigrok/WikiGrokAbTest.js
index a5fe732..69b2f94 100644
--- a/javascripts/modules/wikigrok/WikiGrokAbTest.js
+++ b/javascripts/modules/wikigrok/WikiGrokAbTest.js
@@ -24,7 +24,7 @@
this.isEnabled = startDate && endDate &&
( startDate <= now && now <= endDate )
&&
- mode === 'beta';
+ ( mode === 'alpha' || mode === 'beta' );
},
/**
diff --git a/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
b/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
index ba3984e..66d3270 100644
--- a/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
+++ b/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
@@ -15,7 +15,7 @@
var dataProvider = [
[now + 86400, now + 86401, 'beta'], //
startDate is in the future
[now - 86400, now - 86401, 'beta'], // endDate
in the past
- [now - 86400, now + 86400, 'alpha'], // mode
isn't "beta"
+ [now - 86400, now + 86400, 'stable'], // mode
isn't "alpha" or "beta"
],
test;
@@ -30,6 +30,12 @@
assert.strictEqual( enabledTest.isEligible( wikiGrokUser ),
true );
} );
+ QUnit.test( 'isEligible() returns true when the mode is alpha and the
user hasn\'t see WikiGrok as an anonymous user', 1, function ( assert ) {
+ var test = new WikiGrokAbTest( now - 86400, now + 86400,
'alpha' );
+
+ assert.strictEqual( test.isEligible( wikiGrokUser ), true );
+ } );
+
QUnit.test( 'getVersion() throws if the user isn\'t eligible to enter
the test', 1, function ( assert ) {
wikiGrokUser.hasAnonymousVersionCookie.returns( true );
--
To view, visit https://gerrit.wikimedia.org/r/172551
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I190716d7f68af9c8407b467399198173eddbab82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits