Skip to content

Commit

Permalink
Make test a bit more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Mar 12, 2024
1 parent 47530df commit b89b10e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions posthog/models/test/test_event_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,15 @@ def _setup_action_selector_events(self):
attr_class=["one-class"],
),
Element(tag_name="button", nth_child=0, nth_of_type=0),
Element(tag_name="div", nth_child=0, nth_of_type=0),
Element(tag_name="div", nth_child=0, nth_of_type=0, attr_id="nested"),
Element(
# Important that in this hierarchy the div is sandwiched between button and section.
# This way makes sure that any conditions which should match this element also work
# if the element is neither first nor last in the hierarchy.
tag_name="div",
nth_child=0,
nth_of_type=0,
),
Element(tag_name="section", nth_child=0, nth_of_type=0, attr_id="nested"),
],
)

Expand Down

0 comments on commit b89b10e

Please sign in to comment.