From 7496bb56ba1ba06c238c9560a7ff5a2e665ab07f Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Fri, 12 Apr 2024 15:36:33 -0700 Subject: [PATCH] Add another test case --- lib/capybara/spec/session/node_spec.rb | 7 +++++++ lib/capybara/spec/views/with_html.erb | 14 +++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/capybara/spec/session/node_spec.rb b/lib/capybara/spec/session/node_spec.rb index 0cc7f3114..e5baf215c 100644 --- a/lib/capybara/spec/session/node_spec.rb +++ b/lib/capybara/spec/session/node_spec.rb @@ -300,6 +300,13 @@ expect(@session.find(:button, 'Should be clickable')).to be_visible expect(@session.find(:button, 'Should not be clickable')).not_to be_visible end + + it 'works with popover parents' do + expect(@session.find(:id, 'popover_parent')).not_to be_visible + expect(@session.find(:id, 'popover_child')).not_to be_visible + @session.click_button('Show parent popover') + expect(@session.find(:id, 'popover_child', text: 'Popover Contents')).to be_visible + end end describe '#obscured?', requires: [:css] do diff --git a/lib/capybara/spec/views/with_html.erb b/lib/capybara/spec/views/with_html.erb index 3a0210ff2..7457a3d56 100644 --- a/lib/capybara/spec/views/with_html.erb +++ b/lib/capybara/spec/views/with_html.erb @@ -203,14 +203,22 @@ banana
- <%# %> - <%# - %>
+
+
+ +
+
+ Popover Contents +
+
+
+
+
spacer