From ddca825f9fb92e6044684ab343da3ac15dcb641e Mon Sep 17 00:00:00 2001 From: Julian Herrero Date: Mon, 4 Mar 2019 19:41:17 +0100 Subject: [PATCH] Update spec after adding default pages The spec was assuming there was only 1 custom page created in the DB. With this change the spec will pass no matter how many custom pages there are in the DB. --- spec/features/admin/widgets/cards_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/features/admin/widgets/cards_spec.rb b/spec/features/admin/widgets/cards_spec.rb index b8ce71cba..316ebc3c2 100644 --- a/spec/features/admin/widgets/cards_spec.rb +++ b/spec/features/admin/widgets/cards_spec.rb @@ -147,7 +147,11 @@ feature "Cards" do scenario "Create", :js do visit admin_site_customization_pages_path - click_link "See Cards" + + within "#site_customization_page_#{custom_page.id}" do + click_link "See Cards" + end + click_link "Create card" fill_in "Title", with: "Card for a custom page"