|
|
|
@ -4,7 +4,7 @@ defmodule BlockScoutWeb.ViewingTransactionsTest do |
|
|
|
|
use BlockScoutWeb.FeatureCase, async: true |
|
|
|
|
|
|
|
|
|
alias Explorer.Chain.Wei |
|
|
|
|
alias BlockScoutWeb.{AddressPage, TransactionListPage, TransactionLogsPage, TransactionPage} |
|
|
|
|
alias BlockScoutWeb.{AddressPage, Notifier, TransactionListPage, TransactionLogsPage, TransactionPage} |
|
|
|
|
|
|
|
|
|
setup do |
|
|
|
|
block = |
|
|
|
@ -102,6 +102,27 @@ defmodule BlockScoutWeb.ViewingTransactionsTest do |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe "viewing a pending transaction page" do |
|
|
|
|
test "can see a pending transaction's details", %{session: session, pending: pending} do |
|
|
|
|
session |
|
|
|
|
|> TransactionPage.visit_page(pending) |
|
|
|
|
|> assert_has(TransactionPage.detail_hash(pending)) |
|
|
|
|
|> assert_has(TransactionPage.is_pending()) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
test "pending transactions live update once collated", %{session: session, pending: pending} do |
|
|
|
|
session |
|
|
|
|
|> TransactionPage.visit_page(pending) |
|
|
|
|
|
|
|
|
|
transaction = with_block(pending) |
|
|
|
|
|
|
|
|
|
Notifier.handle_event({:chain_event, :transactions, [transaction.hash]}) |
|
|
|
|
|
|
|
|
|
session |
|
|
|
|
|> refute_has(TransactionPage.is_pending()) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe "viewing a transaction page" do |
|
|
|
|
test "can navigate to transaction show from list page", %{session: session, transaction: transaction} do |
|
|
|
|
session |
|
|
|
|