Skip to content

Commit 5cc67c3

Browse files
committed
adapt devtools test_prop_check suite
`invalid-nested-prop` became `allow-nested-prop` in dash 2.1.0 moreover, use same css query as in the python version of the `test_props_check.py` suite
1 parent 408138f commit 5cc67c3

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

test/integration/devtools/jl_props_check/jldvpc001_prop_check_errors_with_path.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ test_cases = Dict(
1313
"component"=> dcc_checklist,
1414
"props"=> (options = [Dict("label" => "hello")], value = ["test"]),
1515
),
16-
"invalid-nested-prop"=> Dict(
17-
"fail"=> true,
18-
"name"=> "invalid nested prop",
19-
"component"=> dcc_checklist,
20-
"props"=> (options = [Dict("label"=> "hello", "value"=> true)], value = ["test"]),
21-
),
2216
"invalid-arrayOf"=> Dict(
2317
"fail"=> true,
2418
"name"=> "invalid arrayOf",
@@ -73,6 +67,12 @@ test_cases = Dict(
7367
"component"=> html_div,
7468
"props"=> (children = Dict("hello" => "world"),),
7569
),
70+
"allow-nested-prop"=> Dict(
71+
"fail"=> false,
72+
"name"=> "allow nested prop",
73+
"component"=> dcc_checklist,
74+
"props"=> (options = [Dict("label"=> "hello", "value"=> true)], value = ["test"]),
75+
),
7676
"allow-null-2"=> Dict(
7777
"fail"=> false,
7878
"name"=> "allow null as value",

test/integration/devtools/test_props_check.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ def jl_test_file_path(filename):
1616
"fail": True,
1717
"name": 'missing required "value" inside options',
1818
},
19-
"invalid-nested-prop": {
20-
"fail": True,
21-
"name": "invalid nested prop",
22-
},
2319
"invalid-arrayOf": {
2420
"fail": True,
2521
"name": "invalid arrayOf",
@@ -56,6 +52,10 @@ def jl_test_file_path(filename):
5652
"fail": True,
5753
"name": "returning a dictionary",
5854
},
55+
"allow-nested-prop": {
56+
"fail": False,
57+
"name": "allow nested prop",
58+
},
5959
"allow-null-2": {
6060
"fail": False,
6161
"name": "allow null as value",
@@ -99,6 +99,7 @@ def test_jldvpc001_prop_check_errors_with_path(dashjl):
9999

100100
if test_cases[tc]["fail"]:
101101
dashjl.wait_for_element(".test-devtools-error-toggle", timeout=10).click()
102-
dashjl.wait_for_element(".dash-error-card")
102+
dashjl.wait_for_element(".dash-fe-error__info")
103103
else:
104104
dashjl.wait_for_element("#new-component", timeout=2)
105+
dashjl.wait_for_no_elements(".test-devtools-error-toggle")

0 commit comments

Comments
 (0)