Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit 1b3d963

Browse files
author
Shane Tomlinson
authored
Merge pull request #6766 from mozilla/recovery-key-experiment-simplify r=@vbudhram
chore(recovery-key): Remove all recovery key experiment code.
2 parents e825e95 + 6d64c59 commit 1b3d963

12 files changed

Lines changed: 44 additions & 299 deletions

File tree

app/scripts/lib/experiments/grouping-rules/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const experimentGroupingRules = [
1818
require('./send-sms-install-link'),
1919
require('./sentry'),
2020
require('./token-code'),
21-
require('./recovery-key')
2221
].map(ExperimentGroupingRule => new ExperimentGroupingRule());
2322

2423
class ExperimentChoiceIndex {

app/scripts/lib/experiments/grouping-rules/recovery-key.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/scripts/models/auth_brokers/base.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ define(function (require, exports, module) {
121121
this._isForceAuth = this._isForceAuthUrl();
122122
this.importSearchParamsUsingSchema(QUERY_PARAMETER_SCHEMA, AuthErrors);
123123

124-
this.setCapability('showAccountRecovery', !! this.getSearchParam('showAccountRecovery'));
125-
126124
if (this.hasCapability('fxaStatus')) {
127125
return this._fetchFxaStatus();
128126
}
@@ -487,10 +485,6 @@ define(function (require, exports, module) {
487485
* on subsequent signin attempts rather than generating a new token each time?
488486
*/
489487
reuseExistingSession: false,
490-
/**
491-
* Should account recovery be enabled.
492-
*/
493-
showAccountRecovery: false,
494488
/**
495489
* Is signup supported? the fx_ios_v1 broker can disable it.
496490
*/

app/scripts/views/mixins/recovery-key-experiment-mixin.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

app/scripts/views/ready.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import PulseGraphicMixin from './mixins/pulse-graphic-mixin';
1818
import ServiceMixin from './mixins/service-mixin';
1919
import Template from 'templates/ready.mustache';
2020
import VerificationReasonMixin from './mixins/verification-reason-mixin';
21-
import RecoverykeyExperiment from './mixins/recovery-key-experiment-mixin';
2221

2322
const t = msg => msg;
2423

@@ -162,7 +161,6 @@ Cocktail.mixin(
162161
FlowEventsMixin,
163162
MarketingMixin({ marketingId: Constants.MARKETING_ID_SPRING_2015 }),
164163
PulseGraphicMixin,
165-
RecoverykeyExperiment,
166164
ServiceMixin,
167165
VerificationReasonMixin
168166
);

app/scripts/views/settings/account_recovery/account_recovery.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import SettingsPanelMixin from '../../mixins/settings-panel-mixin';
88
import Template from 'templates/settings/account_recovery/account_recovery.mustache';
99
import showProgressIndicator from '../../decorators/progress_indicator';
1010
import LastCheckedTimeMixin from '../../mixins/last-checked-time-mixin';
11-
import RecoveryKeyExperimentMixin from '../../mixins/recovery-key-experiment-mixin';
1211
import UpgradeSessionMixin from '../../mixins/upgrade-session-mixin';
1312

1413
const t = msg => msg;
@@ -42,28 +41,12 @@ const View = BaseView.extend({
4241
this.navigate('settings/account_recovery/confirm_revoke');
4342
},
4443

45-
_isPanelEnabled() {
46-
if (this.broker.hasCapability('showAccountRecovery')) {
47-
return true;
48-
}
49-
50-
if (this.getRecoveryKeyExperimentGroup() === 'treatment') {
51-
return true;
52-
}
53-
54-
return false;
55-
},
56-
5744
initialize() {
5845
this.listenTo(this.model, 'change:hasRecoveryKey', this.render);
5946
},
6047

6148
beforeRender() {
6249
const account = this.getSignedInAccount();
63-
if (! this._isPanelEnabled()) {
64-
return this.remove();
65-
}
66-
6750
return this.setupSessionGateIfRequired()
6851
.then(() => {
6952
return account.checkRecoveryKeyExists()
@@ -97,7 +80,6 @@ Cocktail.mixin(
9780
}),
9881
SettingsPanelMixin,
9982
LastCheckedTimeMixin,
100-
RecoveryKeyExperimentMixin
10183
);
10284

10385
module.exports = View;

app/tests/spec/lib/experiments/grouping-rules/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ define(function (require, exports, module) {
1212

1313
describe('lib/experiments/grouping-rules/index', () => {
1414
it('EXPERIMENT_NAMES is exported', () => {
15-
assert.lengthOf(ExperimentGroupingRules.EXPERIMENT_NAMES, 8);
15+
assert.lengthOf(ExperimentGroupingRules.EXPERIMENT_NAMES, 7);
1616
});
1717

1818
describe('choose', () => {

app/tests/spec/lib/experiments/grouping-rules/recovery-key.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

app/tests/spec/views/ready.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ describe('views/ready', function () {
197197
it('shows `Create recovery key` if in recoveryKey `treatment`', () => {
198198
createView(VerificationReasons.PASSWORD_RESET);
199199
sinon.stub(view, 'isPasswordReset').callsFake(() => true);
200-
sinon.stub(view, 'getRecoveryKeyExperimentGroup').callsFake(() => 'treatment');
201200

202201
return view.render()
203202
.then(() => {

0 commit comments

Comments
 (0)