Skip to content

Commit 13e274e

Browse files
author
Marc-André Rivet
committed
use table instead of graph for devtools tests
1 parent 558bf6c commit 13e274e

File tree

1 file changed

+52
-19
lines changed

1 file changed

+52
-19
lines changed

tests/integration/devtools/test_props_check.py

Lines changed: 52 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import dash_core_components as dcc
22
import dash_html_components as html
3+
from dash_table import DataTable
34
import dash
45
from dash.dependencies import Input, Output
56

@@ -8,8 +9,8 @@
89
"not-boolean": {
910
"fail": True,
1011
"name": 'simple "not a boolean" check',
11-
"component": dcc.Graph,
12-
"props": {"animate": 0},
12+
"component": dcc.Input,
13+
"props": {"debounce": 0},
1314
},
1415
"missing-required-nested-prop": {
1516
"fail": True,
@@ -47,26 +48,50 @@
4748
"invalid-shape-1": {
4849
"fail": True,
4950
"name": "invalid key within nested object",
50-
"component": dcc.Graph,
51-
"props": {"config": {"asdf": "that"}},
51+
"component": DataTable,
52+
"props": {"active_cell": {"asdf": "that"}},
5253
},
5354
"invalid-shape-2": {
5455
"fail": True,
5556
"name": "nested object with bad value",
56-
"component": dcc.Graph,
57-
"props": {"config": {"edits": {"legendPosition": "asdf"}}},
57+
"component": DataTable,
58+
"props": {
59+
"columns": [{
60+
"id": "id",
61+
"name": "name",
62+
"format": {
63+
"locale": "asdf"
64+
}
65+
}]
66+
},
5867
},
5968
"invalid-shape-3": {
6069
"fail": True,
6170
"name": "invalid oneOf within nested object",
62-
"component": dcc.Graph,
63-
"props": {"config": {"toImageButtonOptions": {"format": "asdf"}}},
71+
"component": DataTable,
72+
"props": {
73+
"columns": [{
74+
"id": "id",
75+
"name": "name",
76+
"on_change": {
77+
"action": "asdf"
78+
}
79+
}]
80+
},
6481
},
6582
"invalid-shape-4": {
6683
"fail": True,
6784
"name": "invalid key within deeply nested object",
68-
"component": dcc.Graph,
69-
"props": {"config": {"toImageButtonOptions": {"asdf": "test"}}},
85+
"component": DataTable,
86+
"props": {
87+
"columns": [{
88+
"id": "id",
89+
"name": "name",
90+
"on_change": {
91+
"asdf": "asdf"
92+
}
93+
}]
94+
},
7095
},
7196
"invalid-shape-5": {
7297
"fail": True,
@@ -88,7 +113,7 @@
88113
"no-properties": {
89114
"fail": False,
90115
"name": "no properties",
91-
"component": dcc.Graph,
116+
"component": dcc.Input,
92117
"props": {},
93118
},
94119
"nested-children": {
@@ -112,21 +137,29 @@
112137
"nested-prop-failure": {
113138
"fail": True,
114139
"name": "nested string instead of number/null",
115-
"component": dcc.Graph,
140+
"component": DataTable,
116141
"props": {
117-
"figure": {"data": [{}]},
118-
"config": {
119-
"toImageButtonOptions": {"width": None, "height": "test"}
120-
},
142+
"columns": [{
143+
"id": "id",
144+
"name": "name",
145+
"format": {
146+
"prefix": "asdf"
147+
}
148+
}]
121149
},
122150
},
123151
"allow-null": {
124152
"fail": False,
125153
"name": "nested null",
126-
"component": dcc.Graph,
154+
"component": DataTable,
127155
"props": {
128-
"figure": {"data": [{}]},
129-
"config": {"toImageButtonOptions": {"width": None, "height": None}},
156+
"columns": [{
157+
"id": "id",
158+
"name": "name",
159+
"format": {
160+
"prefix": None
161+
}
162+
}]
130163
},
131164
},
132165
"allow-null-2": {

0 commit comments

Comments
 (0)