Scope test selector better

Co-authored-by: Stamates <stamates@hotmail.com>
pull/395/head
jimmay5469 6 years ago
parent 8b160c6f1d
commit 581044684a
  1. 2
      apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex
  2. 2
      apps/explorer_web/test/explorer_web/features/pages/transaction_list_page.ex

@ -27,7 +27,7 @@
<%= for transaction <- @transactions do %> <%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>"> <div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction"> <div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label"> <div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label" data-test="transaction_type">
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %>
</div> </div>
<div class="col-md-7 col-lg-8 d-flex flex-column"> <div class="col-md-7 col-lg-8 d-flex flex-column">

@ -16,7 +16,7 @@ defmodule ExplorerWeb.TransactionListPage do
end end
def contract_creation(%Transaction{hash: hash}) do def contract_creation(%Transaction{hash: hash}) do
css("[data-transaction-hash='#{hash}']", text: "Contract Creation") css("[data-transaction-hash='#{hash}'] [data-test='transaction_type']", text: "Contract Creation")
end end
def transaction(%Transaction{hash: transaction_hash}) do def transaction(%Transaction{hash: transaction_hash}) do

Loading…
Cancel
Save