Fixes styles for admin homepage

This commit is contained in:
decabeza
2018-06-01 18:00:19 +02:00
parent a9eca180a4
commit ef57396f9d
3 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
<tr id="<%= dom_id(card) %>" class="card"> <tr id="<%= dom_id(card) %>" class="homepage-card">
<td> <td>
<%= card.label %><br> <%= card.label %><br>
<%= card.title %> <%= card.title %>

View File

@@ -5,7 +5,7 @@
<th class="small-4"><%= t("admin.homepage.cards.description") %></th> <th class="small-4"><%= t("admin.homepage.cards.description") %></th>
<th><%= t("admin.homepage.cards.link_text") %> / <%= t("admin.homepage.cards.link_url") %></th> <th><%= t("admin.homepage.cards.link_text") %> / <%= t("admin.homepage.cards.link_url") %></th>
<th><%= t("admin.shared.image") %></th> <th><%= t("admin.shared.image") %></th>
<th><%= t("admin.shared.actions") %></th> <th class="small-2"><%= t("admin.shared.actions") %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -20,7 +20,7 @@ feature 'Cards' do
click_button "Create card" click_button "Create card"
expect(page).to have_content "Success" 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 card = Widget::Card.last
within("#widget_card_#{card.id}") do within("#widget_card_#{card.id}") do
@@ -38,7 +38,7 @@ feature 'Cards' do
visit admin_homepage_path 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 = Widget::Card.all
cards.each do |card| cards.each do |card|
@@ -68,7 +68,7 @@ feature 'Cards' do
expect(page).to have_content "Updated" 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 within("#widget_card_#{Widget::Card.last.id}") do
expect(page).to have_content "Card label updated" expect(page).to have_content "Card label updated"
expect(page).to have_content "Card text updated" expect(page).to have_content "Card text updated"
@@ -90,7 +90,7 @@ feature 'Cards' do
end end
expect(page).to have_content "Removed" expect(page).to have_content "Removed"
expect(page).to have_css(".card", count: 0) expect(page).to have_css(".homepage-card", count: 0)
end end
context "Header Card" do context "Header Card" do
@@ -109,7 +109,7 @@ feature 'Cards' do
expect(page).to have_content "Success" expect(page).to have_content "Success"
within("#header") do 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 label"
expect(page).to have_content "Header text" expect(page).to have_content "Header text"
expect(page).to have_content "Header description" expect(page).to have_content "Header description"
@@ -118,7 +118,7 @@ feature 'Cards' do
end end
within("#cards") do within("#cards") do
expect(page).to have_css(".card", count: 0) expect(page).to have_css(".homepage-card", count: 0)
end end
end end