@@ -77,7 +77,9 @@ def test_initial_state(self):
77
77
id = 'p.c.3' ,
78
78
className = "my-class" ,
79
79
title = 'tooltip' ,
80
- style = {'color' : 'red' , 'fontSize' : 30 }
80
+ style = {'color' : 'red' , 'fontSize' : 30 },
81
+ ** {'data-test' : 'dtest' ,
82
+ 'aria-test' : 'atest' }
81
83
),
82
84
html .Div (id = 'p.c.4' ),
83
85
html .Div ([
@@ -173,7 +175,9 @@ def test_initial_state(self):
173
175
'id="p.c.3"' ,
174
176
'class="my-class"' ,
175
177
'title="tooltip"' ,
176
- ], 3 )
178
+ 'data-test="dtest"' ,
179
+ 'aria-test="atest"'
180
+ ], 5 )
177
181
passed = False
178
182
for permutation in permutations :
179
183
for style in style_permutations :
@@ -233,7 +237,9 @@ def test_initial_state(self):
233
237
'title' : 'tooltip' ,
234
238
'style' : {
235
239
'color' : 'red' , 'fontSize' : 30
236
- }
240
+ },
241
+ 'data-test' : 'dtest' ,
242
+ 'aria-test' : 'atest'
237
243
},
238
244
"type" : "Div"
239
245
},
@@ -1813,12 +1819,17 @@ def test_update_react_version(self):
1813
1819
# Create a dummy component with no props
1814
1820
# (dash-html-components may not support tested React version)
1815
1821
class TestComponent (Component ):
1816
- def __init__ (self , _namespace ):
1822
+ def __init__ (self , _namespace , _valid_wildcard_attributes , _type ):
1817
1823
self ._prop_names = []
1818
1824
self ._namespace = _namespace
1825
+ self ._type = _type
1826
+ self ._valid_wildcard_attributes = _valid_wildcard_attributes
1819
1827
super (TestComponent , self ).__init__ ()
1820
1828
1821
- _test_component = TestComponent (_namespace = 'test-namespace' )
1829
+ _test_component = TestComponent (
1830
+ _namespace = 'test-namespace' ,
1831
+ _valid_wildcard_attributes = ["data-" , "aria-" ],
1832
+ _type = "MyTestComponent" )
1822
1833
app .layout = _test_component
1823
1834
1824
1835
self .startServer (app )
0 commit comments