diff --git a/apps/block_scout_web/test/block_scout_web/features/viewing_blocks_test.exs b/apps/block_scout_web/test/block_scout_web/features/viewing_blocks_test.exs index 6838136ec5..eb5e24e8c4 100644 --- a/apps/block_scout_web/test/block_scout_web/features/viewing_blocks_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/viewing_blocks_test.exs @@ -1,5 +1,5 @@ defmodule BlockScoutWeb.ViewingBlocksTest do - use BlockScoutWeb.FeatureCase, async: true + use BlockScoutWeb.FeatureCase, async: false alias BlockScoutWeb.{BlockListPage, BlockPage} alias Explorer.Chain.Block diff --git a/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs b/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs index 1fd14622cb..b72431fb41 100644 --- a/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs @@ -1,7 +1,7 @@ defmodule BlockScoutWeb.ViewingTransactionsTest do @moduledoc false - use BlockScoutWeb.FeatureCase, async: true + use BlockScoutWeb.FeatureCase, async: false alias BlockScoutWeb.{AddressPage, TransactionListPage, TransactionLogsPage, TransactionPage} alias Explorer.Chain.Wei diff --git a/apps/block_scout_web/test/support/feature_case.ex b/apps/block_scout_web/test/support/feature_case.ex index 14f02c13d8..cf9d64cdc5 100644 --- a/apps/block_scout_web/test/support/feature_case.ex +++ b/apps/block_scout_web/test/support/feature_case.ex @@ -20,9 +20,13 @@ defmodule BlockScoutWeb.FeatureCase do end end - setup do + setup tags do :ok = Ecto.Adapters.SQL.Sandbox.checkout(Explorer.Repo) + unless tags[:async] do + Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, {:shared, self()}) + end + metadata = Phoenix.Ecto.SQL.Sandbox.metadata_for(Explorer.Repo, self()) {:ok, session} = Wallaby.start_session(metadata: metadata) session = Wallaby.Browser.resize_window(session, 1200, 800)