Skip to content

Commit

Permalink
Update end to end tests to look for the li's in question rather than …
Browse files Browse the repository at this point in the history
…looking for the list

  - the list visibility is affected by the css updates of the scrollable columns feature
  • Loading branch information
vanderhoop committed Jul 22, 2017
1 parent 92a79dd commit 876676b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ defmodule PreExistingRetroStateRenderedOnJoiningRetroTest do
retro_path = "/retros/" <> retro.id
session = visit(session, retro_path)

ideas_list_text = session |> find(Query.css(".happy.ideas")) |> Element.text
rendered_idea_text = session |> find(Query.css(".happy.ideas li")) |> Element.text

assert String.contains?(ideas_list_text, "Travis: continuous delivery!")
assert rendered_idea_text =~ "Travis: continuous delivery!"
end

describe "when a retro has already progressed to the `action-items` stage" do
Expand Down
7 changes: 3 additions & 4 deletions test/features/retro_idea_realtime_update_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule RetroIdeaRealtimeUpdateTest do
session_one = authenticate(session_one) |> visit(retro_path)
session_two = authenticate(session_two) |> visit(retro_path)

ideas_list_text = session_one |> find(Query.css(".sad.ideas", visible: false)) |> Element.text()
ideas_list_text = session_one |> find(Query.css(".sad.ideas")) |> Element.text()
refute String.contains?(ideas_list_text, "user stories lack clear business value")

submit_idea(session_two, %{category: "sad", body: "user stories lack clear business value" })
Expand Down Expand Up @@ -51,13 +51,12 @@ defmodule RetroIdeaRealtimeUpdateTest do
facilitator_session = authenticate(facilitator_session) |> visit(retro_path)
participant_session = authenticate(participant_session) |> visit(retro_path)

ideas_list_text = participant_session |> find(Query.css(".happy.ideas")) |> Element.text
ideas_list_text = participant_session |> find(Query.css(".happy.ideas li")) |> Element.text
assert ideas_list_text =~ ~r/slack time/

delete_idea(facilitator_session, %{category: "happy", body: "slack time!"})

ideas_list_text = participant_session |> find(Query.css(".happy.ideas", visible: false)) |> Element.text
refute ideas_list_text =~ ~r/slack time/
assert find(participant_session, Query.css(".happy.ideas li", count: 0))
end
end
end

0 comments on commit 876676b

Please sign in to comment.