Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 5880851

Browse files
add fake experiment (#3688)
Task/Issue URL: https://app.asana.com/0/72649045549333/1208905776162821/f Tech Design URL: CC: **Description**: Used Fake Test feature to generate a cohort and do and A/A test run of the New experiment framework. We want to make sure cohort is assigned and pixels are fired as expected.
1 parent a4f4eb0 commit 5880851

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

DuckDuckGo.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11372,7 +11372,7 @@
1137211372
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
1137311373
requirement = {
1137411374
kind = exactVersion;
11375-
version = 218.0.0;
11375+
version = 218.0.1;
1137611376
};
1137711377
};
1137811378
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {

DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"kind" : "remoteSourceControl",
3333
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
3434
"state" : {
35-
"revision" : "e5d390c8559fbe7b1ca67fd3982c91bcc0437d60",
36-
"version" : "218.0.0"
35+
"revision" : "bbcb41c87c5788718a43883b5b10eb3b4f54aff3",
36+
"version" : "218.0.1"
3737
}
3838
},
3939
{

DuckDuckGo/NewTabPageViewModel.swift

+20
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import Foundation
2121
import Core
22+
import BrowserServicesKit
2223

2324
final class NewTabPageViewModel: ObservableObject {
2425

@@ -39,6 +40,9 @@ final class NewTabPageViewModel: ObservableObject {
3940
isIntroMessageVisible = introDataStorage.newTabPageIntroMessageEnabled ?? false
4041
isOnboarding = false
4142
isShowingSettings = false
43+
44+
// This is just temporarily here to run an A/A test to check the new experiment framework works as expected
45+
_ = AppDependencyProvider.shared.featureFlagger.getCohortIfEnabled(for: CredentialsSavingFlag())
4246
}
4347

4448
func introMessageDisplayed() {
@@ -78,3 +82,19 @@ final class NewTabPageViewModel: ObservableObject {
7882
isDragging = false
7983
}
8084
}
85+
86+
// This is just temporarily here to run an A/A test to check the new experiment framework works as expected
87+
public struct CredentialsSavingFlag: FeatureFlagExperimentDescribing {
88+
public init() {}
89+
90+
public typealias CohortType = Cohort
91+
92+
public var rawValue = "credentialSaving"
93+
94+
public var source: FeatureFlagSource = .remoteReleasable(.subfeature(ExperimentTestSubfeatures.experimentTestAA))
95+
96+
public enum Cohort: String, FlagCohort {
97+
case control
98+
case blue
99+
}
100+
}

0 commit comments

Comments
 (0)