Skip to content

Commit

Permalink
Fix flaky attempt run view (#1488)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyeshe authored Nov 29, 2023
1 parent 9b6b27c commit 73bd3aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/lightning_web/live/attempt_live/show_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ defmodule LightningWeb.AttemptLive.ShowTest do

Lightning.Attempts.start_attempt(attempt)

render_async(view)

assert view
|> element("#attempt-detail-#{attempt_id}")
|> render_async() =~ "Running",
|> render() =~ "Running",
"has running state"

refute view
Expand Down Expand Up @@ -110,9 +112,11 @@ defmodule LightningWeb.AttemptLive.ShowTest do
view |> select_run(attempt, job_a.name)

# Check that the input dataclip is rendered
render_async(view)

assert view
|> element("#run-input-#{run.id}")
|> render_async()
|> render()
|> Floki.parse_fragment!()
|> Floki.text() =~ ~s({ "x": 1})

Expand Down

0 comments on commit 73bd3aa

Please sign in to comment.