Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed May 22, 2020
1 parent d35c60e commit 386a558
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const ArtistArtworkFilter: React.FC<ArtistArtworkFilterProps> = props => {
filters={match && match.location.query}
sortOptions={[
{ value: "-decayed_merch", text: "Default" },
{ value: "-has_price,-prices", text: "Price (desc.)" },
{ value: "-has_price,prices", text: "Price (asc.)" },
{ value: "-partner_updated_at", text: "Recently updated" },
{ value: "-published_at", text: "Recently added" },
{ value: "-year", text: "Artwork year (desc.)" },
Expand Down
16 changes: 16 additions & 0 deletions src/v2/Apps/Artist/Routes/Works/__tests__/Works.jest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ describe("Works Route", () => {
expect(wrapper.html()).toContain("Mock ArtistRecommendations")
expect(wrapper.html()).toContain("Mock ArtistCollectionRail")
})

it("includes the correct sort options", () => {
const sortOptions = wrapper
.find("div[title='Sort'] select option")
.map(el => el.text())

expect(sortOptions).toEqual([
"Default",
"Price (desc.)",
"Price (asc.)",
"Recently updated",
"Recently added",
"Artwork year (desc.)",
"Artwork year (asc.)",
])
})
})

describe("Artist Recommendations", () => {
Expand Down

0 comments on commit 386a558

Please sign in to comment.