Fix the tests

this test was breaking because it started from the async page that was
very unstable and the element wasn't being found by the driver even
though it works correctly on a normal browser so I made it change the
starting point to a page that is no async and skipping the "click on the
tab step"
gsf-async-load-token-transfers
Gustavo Santos Ferreira 6 years ago
parent 34d2753a63
commit edb93347c2
  1. 6
      apps/block_scout_web/test/block_scout_web/features/pages/token_page.ex
  2. 1
      apps/block_scout_web/test/block_scout_web/features/viewing_tokens_test.exs

@ -10,7 +10,11 @@ defmodule BlockScoutWeb.TokenPage do
end
def visit_page(session, contract_address_hash) do
visit(session, "tokens/#{contract_address_hash}")
visit(session, "tokens/#{contract_address_hash}/token_holders")
end
def token_holders_tab(count: count) do
css("[data-test='token_holders_tab']", count: count)
end
def click_tokens_holders(session) do

@ -15,7 +15,6 @@ defmodule BlockScoutWeb.ViewingTokensTest do
session
|> TokenPage.visit_page(token.contract_address)
|> TokenPage.click_tokens_holders()
|> assert_has(TokenPage.token_holders(count: 2))
end
end

Loading…
Cancel
Save