diff --git a/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex b/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex index d655d1e86d..04c7a0aa9d 100644 --- a/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex +++ b/apps/block_scout_web/lib/block_scout_web/channels/block_channel.ex @@ -24,7 +24,8 @@ defmodule BlockScoutWeb.BlockChannel do View.render_to_string( BlockView, "_tile.html", - block: block + block: block, + block_type: BlockView.block_type(block) ) rendered_chain_block = diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex index 227c0bd09a..b23566af7a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/_tile.html.eex @@ -1,4 +1,4 @@ -
+
@@ -12,16 +12,14 @@ @block, class: "tile-title", to: block_path(BlockScoutWeb.Endpoint, :show, @block), - "data-selector": "block-number", - "data-block-number": to_string(@block.number) + "data-selector": "block-number" ) %> <% else %> <%= link( @block, class: "tile-title", to: block_path(BlockScoutWeb.Endpoint, :show, @block.hash), - "data-selector": "block-number", - "data-block-number": to_string(@block.number) + "data-selector": "block-number" ) %> <% end %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex index 40a3f2aa3f..11ea8142e8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex @@ -1,4 +1,4 @@ -
+
diff --git a/apps/block_scout_web/test/block_scout_web/features/pages/block_list_page.ex b/apps/block_scout_web/test/block_scout_web/features/pages/block_list_page.ex index d9dbd447b6..9029964385 100644 --- a/apps/block_scout_web/test/block_scout_web/features/pages/block_list_page.ex +++ b/apps/block_scout_web/test/block_scout_web/features/pages/block_list_page.ex @@ -20,7 +20,7 @@ defmodule BlockScoutWeb.BlockListPage do end def block(%Block{number: block_number}) do - css("[data-block-number='#{block_number}']") + css("[data-selector='block-tile'][data-block-number='#{block_number}']") end def place_holder_blocks(count) do @@ -28,6 +28,6 @@ defmodule BlockScoutWeb.BlockListPage do end def blocks(count) do - css("[data-selector='block-number']", count: count) + css("[data-selector='block-tile']", count: count) end end