From 372721b5c775ce7b78709bf4e3cd97761dc20c72 Mon Sep 17 00:00:00 2001 From: Stamates Date: Tue, 10 Jul 2018 16:11:23 -0400 Subject: [PATCH] Scope transaction css selector --- .../_internal_transaction.html.eex | 2 +- .../templates/address_transaction/_transaction.html.eex | 2 +- .../explorer_web/templates/block_transaction/index.html.eex | 2 +- .../lib/explorer_web/templates/chain/_transactions.html.eex | 2 +- .../templates/pending_transaction/index.html.eex | 2 +- .../lib/explorer_web/templates/transaction/_link.html.eex | 5 ++--- .../lib/explorer_web/templates/transaction/index.html.eex | 2 +- .../test/explorer_web/features/pages/address_page.ex | 2 +- .../explorer_web/features/pages/transaction_list_page.ex | 4 ++-- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex b/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex index c8b2b2390e..96392e2f4f 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex @@ -1,5 +1,5 @@
-
+
<%= gettext("Internal Transaction") %>
diff --git a/apps/explorer_web/lib/explorer_web/templates/address_transaction/_transaction.html.eex b/apps/explorer_web/lib/explorer_web/templates/address_transaction/_transaction.html.eex index e9c6356125..5a2d5ba2d9 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address_transaction/_transaction.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address_transaction/_transaction.html.eex @@ -1,4 +1,4 @@ -
+
<%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %> diff --git a/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex index 4454eaf609..bbb0ffdf42 100644 --- a/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex @@ -147,7 +147,7 @@ <%= for transaction <- @transactions do %> - +
diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex index e8a0953b90..1f7872dcf3 100644 --- a/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex @@ -3,7 +3,7 @@ <%= link(gettext("View All Transactions →"), to: transaction_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %>

<%= gettext "Transactions" %>

<%= for transaction <- @chain.transactions do %> -
+
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %> diff --git a/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex index 773c29a058..4a79a67a24 100644 --- a/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex @@ -41,7 +41,7 @@ <%= for transaction <- @transactions do %> - +
diff --git a/apps/explorer_web/lib/explorer_web/templates/transaction/_link.html.eex b/apps/explorer_web/lib/explorer_web/templates/transaction/_link.html.eex index 46bf35a8a2..4f11057907 100644 --- a/apps/explorer_web/lib/explorer_web/templates/transaction/_link.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/transaction/_link.html.eex @@ -1,5 +1,4 @@ -<%= link(@transaction_hash , +<%= link(@transaction_hash, to: transaction_path(ExplorerWeb.Endpoint, :show, @locale, @transaction_hash), - "data-test": "transaction_hash", - "data-transaction-hash": @transaction_hash, + "data-test": "transaction_hash_link", "class": "tile-title text-truncate") %> diff --git a/apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex index 3582168ca8..dfd35cd801 100644 --- a/apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex @@ -42,7 +42,7 @@ <%= for transaction <- @transactions do %> - +
diff --git a/apps/explorer_web/test/explorer_web/features/pages/address_page.ex b/apps/explorer_web/test/explorer_web/features/pages/address_page.ex index 7f555f11cd..d31f03b924 100644 --- a/apps/explorer_web/test/explorer_web/features/pages/address_page.ex +++ b/apps/explorer_web/test/explorer_web/features/pages/address_page.ex @@ -40,7 +40,7 @@ defmodule ExplorerWeb.AddressPage do end def transaction(transaction_hash) do - css("[data-test='transaction_hash'][data-transaction-hash='#{transaction_hash}']") + css("[data-transaction-hash='#{transaction_hash}']") end def transaction_count do diff --git a/apps/explorer_web/test/explorer_web/features/pages/transaction_list_page.ex b/apps/explorer_web/test/explorer_web/features/pages/transaction_list_page.ex index f4f84d2853..45b4316021 100644 --- a/apps/explorer_web/test/explorer_web/features/pages/transaction_list_page.ex +++ b/apps/explorer_web/test/explorer_web/features/pages/transaction_list_page.ex @@ -8,7 +8,7 @@ defmodule ExplorerWeb.TransactionListPage do alias Explorer.Chain.{InternalTransaction, Transaction} def click_transaction(session, %Transaction{hash: transaction_hash}) do - click(session, css("[data-test='transaction_hash'][data-transaction-hash='#{transaction_hash}']")) + click(session, css("[data-transaction-hash='#{transaction_hash}'] [data-test='transaction_hash_link']")) end def click_pending(session) do @@ -20,7 +20,7 @@ defmodule ExplorerWeb.TransactionListPage do end def transaction(%Transaction{hash: transaction_hash}) do - css("[data-test='transaction_hash'][data-transaction-hash='#{transaction_hash}']") + css("[data-transaction-hash='#{transaction_hash}']") end def visit_page(session) do