Revive accidentally deleted tests

Co-authored-by: tmecklem <timothy@mecklem.com>
pull/199/head
jimmay5469 7 years ago
parent 2e9b824731
commit af2aaa9593
  1. 11
      apps/explorer_web/test/explorer_web/features/viewing_addresses_test.exs
  2. 11
      apps/explorer_web/test/explorer_web/features/viewing_blocks_test.exs
  3. 9
      apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs

@ -1,7 +1,7 @@
defmodule ExplorerWeb.ViewingAddressesTest do
use ExplorerWeb.FeatureCase, async: true
alias ExplorerWeb.AddressPage
alias ExplorerWeb.{AddressPage, HomePage}
setup do
block = insert(:block)
@ -27,6 +27,15 @@ defmodule ExplorerWeb.ViewingAddressesTest do
}}
end
test "search for address", %{session: session} do
address = insert(:address)
session
|> HomePage.visit_page()
|> HomePage.search(to_string(address.hash))
|> assert_has(AddressPage.detail_hash(address))
end
test "viewing address overview information", %{session: session} do
address = insert(:address, fetched_balance: 500)

@ -1,7 +1,7 @@
defmodule ExplorerWeb.ViewingBlocksTest do
use ExplorerWeb.FeatureCase, async: true
alias ExplorerWeb.{BlockListPage, HomePage}
alias ExplorerWeb.{BlockListPage, BlockPage, HomePage}
setup do
timestamp = Timex.now() |> Timex.shift(hours: -1)
@ -20,6 +20,15 @@ defmodule ExplorerWeb.ViewingBlocksTest do
{:ok, block: block}
end
test "search for blocks", %{session: session} do
block = insert(:block, number: 42)
session
|> HomePage.visit_page()
|> HomePage.search(to_string(block.number))
|> assert_has(BlockPage.detail_number(block))
end
test "viewing blocks on the home page", %{session: session} do
session
|> HomePage.visit_page()

@ -68,6 +68,15 @@ defmodule ExplorerWeb.ViewingTransactionsTest do
}}
end
test "search for transactions", %{session: session} do
transaction = insert(:transaction, input: "0x736f636b73")
session
|> HomePage.visit_page()
|> HomePage.search(to_string(transaction.hash))
|> assert_has(TransactionPage.detail_hash(transaction))
end
describe "viewing transaction lists" do
test "transactions on the home page", %{session: session} do
session

Loading…
Cancel
Save