File tree Expand file tree Collapse file tree 13 files changed +27
-28
lines changed
Sources/ContentScopeScripts/dist
integration-test/test-pages/infra/pages Expand file tree Collapse file tree 13 files changed +27
-28
lines changed Original file line number Diff line number Diff line change 1
- - Conditional experiment matching (#1661)
2
- - Move ad blocking setting row to the last position (#1687)
1
+ - Fix casing experiment matching (#1688)
Original file line number Diff line number Diff line change 3760
3760
* }
3761
3761
* }
3762
3762
* ```
3763
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
3763
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
3764
3764
* @param {ConditionBlock } conditionBlock
3765
3765
* @returns {boolean }
3766
3766
*/
3771
3771
const currentCohorts = this . args ?. currentCohorts ;
3772
3772
if ( ! currentCohorts ) return false ;
3773
3773
return currentCohorts . some ( ( cohort ) => {
3774
- return cohort . feature === "ContentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
3774
+ return cohort . feature === "contentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
3775
3775
} ) ;
3776
3776
}
3777
3777
/**
Original file line number Diff line number Diff line change 4465
4465
* }
4466
4466
* }
4467
4467
* ```
4468
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
4468
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
4469
4469
* @param {ConditionBlock} conditionBlock
4470
4470
* @returns {boolean}
4471
4471
*/
4476
4476
const currentCohorts = this.args?.currentCohorts;
4477
4477
if (!currentCohorts) return false;
4478
4478
return currentCohorts.some((cohort) => {
4479
- return cohort.feature === "ContentScopeExperiments " && cohort.subfeature === experiment.experimentName && cohort.cohort === experiment.cohort;
4479
+ return cohort.feature === "contentScopeExperiments " && cohort.subfeature === experiment.experimentName && cohort.cohort === experiment.cohort;
4480
4480
});
4481
4481
}
4482
4482
/**
Original file line number Diff line number Diff line change 2888
2888
* }
2889
2889
* }
2890
2890
* ```
2891
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
2891
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
2892
2892
* @param {ConditionBlock } conditionBlock
2893
2893
* @returns {boolean }
2894
2894
*/
2899
2899
const currentCohorts = this . args ?. currentCohorts ;
2900
2900
if ( ! currentCohorts ) return false ;
2901
2901
return currentCohorts . some ( ( cohort ) => {
2902
- return cohort . feature === "ContentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
2902
+ return cohort . feature === "contentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
2903
2903
} ) ;
2904
2904
}
2905
2905
/**
Original file line number Diff line number Diff line change 4431
4431
* }
4432
4432
* }
4433
4433
* ```
4434
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
4434
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
4435
4435
* @param {ConditionBlock } conditionBlock
4436
4436
* @returns {boolean }
4437
4437
*/
4442
4442
const currentCohorts = this . args ?. currentCohorts ;
4443
4443
if ( ! currentCohorts ) return false ;
4444
4444
return currentCohorts . some ( ( cohort ) => {
4445
- return cohort . feature === "ContentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
4445
+ return cohort . feature === "contentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
4446
4446
} ) ;
4447
4447
}
4448
4448
/**
Original file line number Diff line number Diff line change 4271
4271
* }
4272
4272
* }
4273
4273
* ```
4274
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
4274
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
4275
4275
* @param {ConditionBlock } conditionBlock
4276
4276
* @returns {boolean }
4277
4277
*/
4282
4282
const currentCohorts = this . args ?. currentCohorts ;
4283
4283
if ( ! currentCohorts ) return false ;
4284
4284
return currentCohorts . some ( ( cohort ) => {
4285
- return cohort . feature === "ContentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
4285
+ return cohort . feature === "contentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
4286
4286
} ) ;
4287
4287
}
4288
4288
/**
Original file line number Diff line number Diff line change 3712
3712
* }
3713
3713
* }
3714
3714
* ```
3715
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
3715
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
3716
3716
* @param {ConditionBlock } conditionBlock
3717
3717
* @returns {boolean }
3718
3718
*/
3723
3723
const currentCohorts = this . args ?. currentCohorts ;
3724
3724
if ( ! currentCohorts ) return false ;
3725
3725
return currentCohorts . some ( ( cohort ) => {
3726
- return cohort . feature === "ContentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
3726
+ return cohort . feature === "contentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
3727
3727
} ) ;
3728
3728
}
3729
3729
/**
Original file line number Diff line number Diff line change 3712
3712
* }
3713
3713
* }
3714
3714
* ```
3715
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
3715
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
3716
3716
* @param {ConditionBlock } conditionBlock
3717
3717
* @returns {boolean }
3718
3718
*/
3723
3723
const currentCohorts = this . args ?. currentCohorts ;
3724
3724
if ( ! currentCohorts ) return false ;
3725
3725
return currentCohorts . some ( ( cohort ) => {
3726
- return cohort . feature === "ContentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
3726
+ return cohort . feature === "contentScopeExperiments " && cohort . subfeature === experiment . experimentName && cohort . cohort === experiment . cohort ;
3727
3727
} ) ;
3728
3728
}
3729
3729
/**
Original file line number Diff line number Diff line change 5774
5774
* }
5775
5775
* }
5776
5776
* ```
5777
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
5777
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
5778
5778
* @param {ConditionBlock} conditionBlock
5779
5779
* @returns {boolean}
5780
5780
*/
5785
5785
const currentCohorts = this.args?.currentCohorts;
5786
5786
if (!currentCohorts) return false;
5787
5787
return currentCohorts.some((cohort) => {
5788
- return cohort.feature === "ContentScopeExperiments " && cohort.subfeature === experiment.experimentName && cohort.cohort === experiment.cohort;
5788
+ return cohort.feature === "contentScopeExperiments " && cohort.subfeature === experiment.experimentName && cohort.cohort === experiment.cohort;
5789
5789
});
5790
5790
}
5791
5791
/**
@@ -18437,12 +18437,12 @@
18437
18437
},
18438
18438
currentCohorts: [
18439
18439
{
18440
- feature: "ContentScopeExperiments ",
18440
+ feature: "contentScopeExperiments ",
18441
18441
subfeature: "bloops",
18442
18442
cohort: "control"
18443
18443
},
18444
18444
{
18445
- feature: "ContentScopeExperiments ",
18445
+ feature: "contentScopeExperiments ",
18446
18446
subfeature: "test",
18447
18447
cohort: "treatment"
18448
18448
}
Original file line number Diff line number Diff line change 5301
5301
* }
5302
5302
* }
5303
5303
* ```
5304
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
5304
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
5305
5305
* @param {ConditionBlock} conditionBlock
5306
5306
* @returns {boolean}
5307
5307
*/
5312
5312
const currentCohorts = this.args?.currentCohorts;
5313
5313
if (!currentCohorts) return false;
5314
5314
return currentCohorts.some((cohort) => {
5315
- return cohort.feature === "ContentScopeExperiments " && cohort.subfeature === experiment.experimentName && cohort.cohort === experiment.cohort;
5315
+ return cohort.feature === "contentScopeExperiments " && cohort.subfeature === experiment.experimentName && cohort.cohort === experiment.cohort;
5316
5316
});
5317
5317
}
5318
5318
/**
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ function generateConfig() {
24
24
},
25
25
currentCohorts: [
26
26
{
27
- feature: 'ContentScopeExperiments ',
27
+ feature: 'contentScopeExperiments ',
28
28
subfeature: 'bloops',
29
29
cohort: 'control',
30
30
},
31
31
{
32
- feature: 'ContentScopeExperiments ',
32
+ feature: 'contentScopeExperiments ',
33
33
subfeature: 'test',
34
34
cohort: 'treatment',
35
35
},
Original file line number Diff line number Diff line change 14
14
<code>
15
15
currentCohorts: [
16
16
{
17
- "feature": "ContentScopeExperiments ",
17
+ "feature": "contentScopeExperiments ",
18
18
"subfeature": "bloops",
19
19
"cohort": "control",
20
20
},
21
21
{
22
- "feature": "ContentScopeExperiments ",
22
+ "feature": "contentScopeExperiments ",
23
23
"subfeature": "test",
24
24
"cohort": "treatment",
25
25
},
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export default class ConfigFeature {
178
178
* }
179
179
* }
180
180
* ```
181
- * Where featureName "ContentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
181
+ * Where featureName "contentScopeExperiments " has a subfeature "experimentName" and cohort "cohort-name"
182
182
* @param {ConditionBlock} conditionBlock
183
183
* @returns {boolean}
184
184
*/
@@ -190,7 +190,7 @@ export default class ConfigFeature {
190
190
if (!currentCohorts) return false;
191
191
return currentCohorts.some((cohort) => {
192
192
return (
193
- cohort.feature === 'ContentScopeExperiments ' &&
193
+ cohort.feature === 'contentScopeExperiments ' &&
194
194
cohort.subfeature === experiment.experimentName &&
195
195
cohort.cohort === experiment.cohort
196
196
);
You can’t perform that action at this time.
0 commit comments