Skip to content

Commit

Permalink
Simplify form element header tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robinkar committed Jan 29, 2025
1 parent 1b0ad78 commit 624fdbb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/dashboard/test/system/batch_connect_widgets_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,9 @@ def make_bc_app(dir, form)
visit new_batch_connect_session_context_url('sys/bc_jupyter')

# Span exists (HTML works).
header_span = find(id: 'test_form_element_header')
assert_equal('Some text in a span', header_span.text)
header_span = find(id: 'test_form_element_header', text: 'Some text in a span')
# Markdown element exists (## => h2).
markdown_header = header_span.find(:xpath, './/../../h2')
assert_equal('Header using Markdown', markdown_header.text)
markdown_header = header_span.find(:xpath, './/../../h2', text: 'Header using Markdown')
# Header precedes its form element.
markdown_header.first(:xpath, './/following-sibling::div').find(id: 'batch_connect_session_context_node_type')
end
Expand Down

0 comments on commit 624fdbb

Please sign in to comment.