Skip to content

Commit

Permalink
fix: DAH-3002 Restore lottery section for open sales lottery listings (
Browse files Browse the repository at this point in the history
…#2427)

* fix: check for fcfs instead of isOpen

* test: remove incorrect test
  • Loading branch information
cliu02 authored Nov 25, 2024
1 parent 81bcf71 commit e7481fd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { fcfsSaleListing } from "../../data/RailsSaleListing/listing-sale-fcfs"
import { closedRentalListing } from "../../data/RailsRentalListing/listing-rental-closed"
import { useFeatureFlag } from "../../../hooks/useFeatureFlag"
import { notYetOpenSaleFcfsListing } from "../../data/RailsSaleListing/listing-sale-fcfs-not-yet-open"
import { openSaleListing } from "../../data/RailsSaleListing/listing-sale-open"

jest.mock("../../../hooks/useFeatureFlag", () => ({
useFeatureFlag: jest.fn(),
Expand Down Expand Up @@ -56,14 +55,4 @@ describe("MobileListingDetailsLottery", () => {

expect(asFragment()).toMatchSnapshot()
})

it("does not display if listing is open", () => {
;(useFeatureFlag as jest.Mock).mockReturnValue({ flagsReady: true, unleashFlag: true })

const { asFragment } = render(
<MobileListingDetailsLottery listing={openSaleListing} imageSrc={""} />
)

expect(asFragment()).toMatchSnapshot()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,4 @@ exports[`MobileListingDetailsLottery does display when lottery listing is closed
</DocumentFragment>
`;

exports[`MobileListingDetailsLottery does not display if listing is open 1`] = `<DocumentFragment />`;

exports[`MobileListingDetailsLottery does not display when fcfs sale listing 1`] = `<DocumentFragment />`;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const MobileListingDetailsLottery = ({ imageSrc, listing }: ListingDetail

return (
listing &&
shouldRenderComponent && (
!shouldNotRenderForFcfs && (
<Mobile>
<ListingDetailItem
imageAlt={""}
Expand Down

0 comments on commit e7481fd

Please sign in to comment.