Allow sorting widget_cards on custom pages
This commit is contained in:
@@ -94,11 +94,14 @@ describe "Custom Pages" do
|
||||
|
||||
scenario "Show widget cards for that page" do
|
||||
custom_page = create(:site_customization_page, :published)
|
||||
create(:widget_card, cardable: custom_page, title: "Card Highlights")
|
||||
create(:widget_card, cardable: custom_page, title: "Medium prominent card", order: 2)
|
||||
create(:widget_card, cardable: custom_page, title: "Less prominent card", order: 2)
|
||||
create(:widget_card, cardable: custom_page, title: "Card Highlights", order: 1)
|
||||
|
||||
visit custom_page.url
|
||||
|
||||
expect(page).to have_content "CARD HIGHLIGHTS"
|
||||
expect("CARD HIGHLIGHTS").to appear_before("MEDIUM PROMINENT CARD")
|
||||
expect("MEDIUM PROMINENT CARD").to appear_before("LESS PROMINENT CARD")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user