Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy #13457

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Deploy #13457

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,6 @@
"line_number": 512
}
],
"src/Apps/Order/Routes/Shipping2/index.tsx": [
{
"type": "Base64 High Entropy String",
"filename": "src/Apps/Order/Routes/Shipping2/index.tsx",
"hashed_secret": "a215ca0c1670592780526439f4e0642af430072d",
"is_verified": false,
"line_number": 23
}
],
"src/Apps/ViewingRoom/Routes/Statement/__tests__/ViewingRoomStatementRoute.jest.tsx": [
{
"type": "Base64 High Entropy String",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Join, Spacer } from "@artsy/palette"
import { ProgressiveOnboardingAlertSelectFilter } from "Components/ProgressiveOnboarding/ProgressiveOnboardingAlertSelectFilter"
import { ArtistSeriesFilter } from "Components/ArtworkFilter/ArtworkFilters/ArtistSeriesFilter"
import { useFeatureFlag } from "System/useFeatureFlag"
import { AvailabilityFilter } from "Components/ArtworkFilter/ArtworkFilters/AvailabilityFilter"

interface ArtistArtworkFiltersProps {}

Expand All @@ -24,10 +25,12 @@ export const ArtistArtworkFilters: React.FC<ArtistArtworkFiltersProps> = props =
const isArtistSeriesFilterEnabled = useFeatureFlag(
"onyx_enable-artist-series-filter"
)
const isAvailabilityFilterEnabled = useFeatureFlag("onyx_availability-filter")

return (
<Join separator={<Spacer y={4} />}>
<KeywordFilter />
{isAvailabilityFilterEnabled && <AvailabilityFilter />}
<ArtistsFilter user={user} expanded />
<ProgressiveOnboardingAlertSelectFilter>
<AttributionClassFilter expanded />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,26 @@ describe("feature flag: onyx_enable-artist-series-filter", () => {
})
})
})

describe("feature flag: onyx_availability", () => {
const mockUseFeatureFlag = useFeatureFlag as jest.Mock

describe("when the feature flag is enabled", () => {
beforeEach(() => {
mockUseFeatureFlag.mockImplementation(() => true)
})
it("renders the Availability filter", () => {
render(<ArtistArtworkFilters />)
expect(screen.getByText("Availability")).toBeInTheDocument()
})
})
describe("when the feature flag is disabled", () => {
beforeEach(() => {
mockUseFeatureFlag.mockImplementation(() => false)
})
it("does not render the Availability filter", () => {
render(<ArtistArtworkFilters />)
expect(screen.queryByText("Availability")).not.toBeInTheDocument()
})
})
})
Loading