File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions
49
49
50
50
PATTERN_HTML = "['\" ]((\\ \\ \" |\\ \\ '|[^\" '])*)['\" ]"
51
51
PATTERN_UNICODE_ESCAPED_CHAR = /\\ u([0-9a-zA-Z]{4})/
52
- SKELETAL_PATTERN = "(?:jQuery|\\ $)\\ (%s\\ )\\ .%s\\ (%s\\ ); "
52
+ SKELETAL_PATTERN = "(?:jQuery|\\ $)\\ (%s\\ )\\ .%s\\ (%s\\ )[;]? "
53
53
54
54
def assert_select_jquery ( *args , &block )
55
55
jquery_method = args . first . is_a? ( Symbol ) ? args . shift : nil
Original file line number Diff line number Diff line change
1
+ require 'ostruct'
1
2
require_relative 'test_helper'
2
3
require_relative '../lib/jquery/assert_select'
3
4
@@ -19,6 +20,9 @@ class AssertSelectJQueryTest < ActiveSupport::TestCase
19
20
$("#cart tr:not(.total_line) > *").remove();
20
21
$("[href|=\" val\" ][href$=\" val\" ][href^=\" val\" ]").remove();
21
22
$("tr + td, li").remove();
23
+
24
+ // without semicolon
25
+ $("#browser_cart").hide("blind", 1000)
22
26
JS
23
27
24
28
setup do
@@ -28,6 +32,7 @@ class AssertSelectJQueryTest < ActiveSupport::TestCase
28
32
def test_target_as_receiver
29
33
assert_nothing_raised do
30
34
assert_select_jquery :show , :blind , '#card'
35
+ assert_select_jquery :hide , :blind , '#browser_cart'
31
36
assert_select_jquery :html , '#id' do
32
37
assert_select 'p' , 'something'
33
38
end
You can’t perform that action at this time.
0 commit comments