From ef57396f9d28f976e43704e9cbcd892bf0c2cc8b Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 1 Jun 2018 18:00:19 +0200 Subject: [PATCH] Fixes styles for admin homepage --- app/views/admin/homepage/_card.html.erb | 2 +- app/views/admin/homepage/_cards.html.erb | 2 +- spec/features/admin/widgets/cards_spec.rb | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/admin/homepage/_card.html.erb b/app/views/admin/homepage/_card.html.erb index 5d2031f62..edbd79abc 100644 --- a/app/views/admin/homepage/_card.html.erb +++ b/app/views/admin/homepage/_card.html.erb @@ -1,4 +1,4 @@ - + <%= card.label %>
<%= card.title %> diff --git a/app/views/admin/homepage/_cards.html.erb b/app/views/admin/homepage/_cards.html.erb index ab75445fa..96a836141 100644 --- a/app/views/admin/homepage/_cards.html.erb +++ b/app/views/admin/homepage/_cards.html.erb @@ -5,7 +5,7 @@ <%= t("admin.homepage.cards.description") %> <%= t("admin.homepage.cards.link_text") %> / <%= t("admin.homepage.cards.link_url") %> <%= t("admin.shared.image") %> - <%= t("admin.shared.actions") %> + <%= t("admin.shared.actions") %> diff --git a/spec/features/admin/widgets/cards_spec.rb b/spec/features/admin/widgets/cards_spec.rb index 3509b99a8..58899f0a2 100644 --- a/spec/features/admin/widgets/cards_spec.rb +++ b/spec/features/admin/widgets/cards_spec.rb @@ -20,7 +20,7 @@ feature 'Cards' do click_button "Create card" expect(page).to have_content "Success" - expect(page).to have_css(".card", count: 1) + expect(page).to have_css(".homepage-card", count: 1) card = Widget::Card.last within("#widget_card_#{card.id}") do @@ -38,7 +38,7 @@ feature 'Cards' do visit admin_homepage_path - expect(page).to have_css(".card", count: 3) + expect(page).to have_css(".homepage-card", count: 3) cards = Widget::Card.all cards.each do |card| @@ -68,7 +68,7 @@ feature 'Cards' do expect(page).to have_content "Updated" - expect(page).to have_css(".card", count: 1) + expect(page).to have_css(".homepage-card", count: 1) within("#widget_card_#{Widget::Card.last.id}") do expect(page).to have_content "Card label updated" expect(page).to have_content "Card text updated" @@ -90,7 +90,7 @@ feature 'Cards' do end expect(page).to have_content "Removed" - expect(page).to have_css(".card", count: 0) + expect(page).to have_css(".homepage-card", count: 0) end context "Header Card" do @@ -109,7 +109,7 @@ feature 'Cards' do expect(page).to have_content "Success" within("#header") do - expect(page).to have_css(".card", count: 1) + expect(page).to have_css(".homepage-card", count: 1) expect(page).to have_content "Header label" expect(page).to have_content "Header text" expect(page).to have_content "Header description" @@ -118,7 +118,7 @@ feature 'Cards' do end within("#cards") do - expect(page).to have_css(".card", count: 0) + expect(page).to have_css(".homepage-card", count: 0) end end