[Housekeeping] Improve test stability (#232)

* Ensured all tests use at least the DataCase module

* addressed one flakey test

* More flakey tests

* Consolidated Mox usage
This commit is contained in:
Kieran
2024-05-08 09:57:36 -07:00
committed by GitHub
parent b5d2ba4191
commit 933daf8c78
39 changed files with 51 additions and 83 deletions
@@ -34,8 +34,10 @@ defmodule PinchflatWeb.Sources.MediaItemTableLiveTest do
describe "media_state" do
test "shows pending media when pending", %{conn: conn, source: source} do
downloaded_media_item = media_item_fixture(source_id: source.id)
pending_media_item = media_item_fixture(source_id: source.id, media_filepath: nil)
downloaded_media_item = media_item_fixture(source_id: source.id, title: "DL-#{Enum.random(0..9999)}")
pending_media_item =
media_item_fixture(source_id: source.id, media_filepath: nil, title: "P-#{Enum.random(0..9999)}")
{:ok, _view, html} = live_isolated(conn, MediaItemTableLive, session: create_session(source, "pending"))