Skip to content

Commit

Permalink
just load the preview in the system test
Browse files Browse the repository at this point in the history
  • Loading branch information
strackoverflow committed Dec 18, 2023
1 parent a3e1b1d commit 183d574
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/system/alpha/dialog_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,11 @@ def test_closes_dialog_that_is_not_top_level
assert_selector "modal-dialog#dialog-one", visible: :hidden
end

def test_can_focus_dialog_body_with_keyboard
# We're just opening the dialog with a scrollable body
# so the Axe scan can ensure the scrollable region is compliant
def test_with_scrollable_body
visit_preview(:long_text)

click_button("Show Dialog")

# tab twice to focus the dialog body
find("modal-dialog").send_keys(:tab).send_keys(:tab)

# the scrollable-region element should now be focused after the two tab presses
assert_equal page.evaluate_script("document.activeElement.tagName"), "SCROLLABLE-REGION"
end
end
end

0 comments on commit 183d574

Please sign in to comment.