Skip to content

Commit

Permalink
Merge pull request #2224 from nulib/1885-flappy-action-states-test
Browse files Browse the repository at this point in the history
Don't expect file set to be role A in action states test
  • Loading branch information
bmquinn authored May 18, 2021
2 parents 010cbd9 + ca9b592 commit faeb456
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/meadow/error_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule Meadow.ErrorTest do
end

bad_function.(0)
assert_receive {:api_request, report}, 1000
assert_receive {:api_request, report}, 2500

with request_context <- report |> get_in(["request", "context"]) do
assert request_context |> Map.get("extra_data") == "foo"
Expand Down
9 changes: 8 additions & 1 deletion test/meadow_web/schema/query/action_states_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ defmodule MeadowWeb.Schema.Query.ActionStatesTest do
{:ok, result} = query_gql(variables: %{"objectId" => file_set.id}, context: gql_context())

with trail <- get_in(result, [:data, "actionStates"]) do
assert(length(trail) == 7)
case file_set.role.id do
"A" ->
assert(length(trail) == 7)

"P" ->
assert(length(trail) == 6)
end

assert_all_have_value(trail, "outcome", "WAITING")
end
end
Expand Down

0 comments on commit faeb456

Please sign in to comment.