Skip to content

Commit

Permalink
IOS-2594 Show test tiers
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatovv committed Apr 5, 2024
1 parent 3964897 commit 25c5bc5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ public extension FeatureFlags {
value(for: .homeTestSwipeGeature)
}

static var membershipTestTiers: Bool {
value(for: .membershipTestTiers)
}

// All toggles
static let features: [FeatureDescription] = [
.setKanbanView,
Expand All @@ -117,6 +121,7 @@ public extension FeatureFlags {
.resetTips,
.showAllTips,
.sharingExtensionShowContentTypes,
.homeTestSwipeGeature
.homeTestSwipeGeature,
.membershipTestTiers
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public extension FeatureDescription {

static let membership = FeatureDescription(
title: "Membership 💸",
type: .feature(author: "[email protected]", releaseVersion: "0.30.0"),
type: .feature(author: "[email protected]", releaseVersion: "5"),
defaultValue: false
)

Expand Down Expand Up @@ -146,4 +146,11 @@ public extension FeatureDescription {
type: .debug,
defaultValue: false
)

static let membershipTestTiers = FeatureDescription(
title: "Show test Membership tiers 💸",
type: .debug,
defaultValue: false,
debugValue: true
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class MembershipService: MembershipServiceProtocol {
$0.noCache = noCache
})
.invoke().tiers
.filter { !$0.isTest }
.filter { FeatureFlags.membershipTestTiers || !$0.isTest }
.asyncMap { await buildMemberhsipTier(tier: $0) }.compactMap { $0 }
}

Expand Down

0 comments on commit 25c5bc5

Please sign in to comment.