Skip to content

Commit

Permalink
use table instead of graph for devtools tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-André Rivet committed Oct 11, 2019
1 parent 558bf6c commit 13e274e
Showing 1 changed file with 52 additions and 19 deletions.
71 changes: 52 additions & 19 deletions tests/integration/devtools/test_props_check.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dash_core_components as dcc
import dash_html_components as html
from dash_table import DataTable
import dash
from dash.dependencies import Input, Output

Expand All @@ -8,8 +9,8 @@
"not-boolean": {
"fail": True,
"name": 'simple "not a boolean" check',
"component": dcc.Graph,
"props": {"animate": 0},
"component": dcc.Input,
"props": {"debounce": 0},
},
"missing-required-nested-prop": {
"fail": True,
Expand Down Expand Up @@ -47,26 +48,50 @@
"invalid-shape-1": {
"fail": True,
"name": "invalid key within nested object",
"component": dcc.Graph,
"props": {"config": {"asdf": "that"}},
"component": DataTable,
"props": {"active_cell": {"asdf": "that"}},
},
"invalid-shape-2": {
"fail": True,
"name": "nested object with bad value",
"component": dcc.Graph,
"props": {"config": {"edits": {"legendPosition": "asdf"}}},
"component": DataTable,
"props": {
"columns": [{
"id": "id",
"name": "name",
"format": {
"locale": "asdf"
}
}]
},
},
"invalid-shape-3": {
"fail": True,
"name": "invalid oneOf within nested object",
"component": dcc.Graph,
"props": {"config": {"toImageButtonOptions": {"format": "asdf"}}},
"component": DataTable,
"props": {
"columns": [{
"id": "id",
"name": "name",
"on_change": {
"action": "asdf"
}
}]
},
},
"invalid-shape-4": {
"fail": True,
"name": "invalid key within deeply nested object",
"component": dcc.Graph,
"props": {"config": {"toImageButtonOptions": {"asdf": "test"}}},
"component": DataTable,
"props": {
"columns": [{
"id": "id",
"name": "name",
"on_change": {
"asdf": "asdf"
}
}]
},
},
"invalid-shape-5": {
"fail": True,
Expand All @@ -88,7 +113,7 @@
"no-properties": {
"fail": False,
"name": "no properties",
"component": dcc.Graph,
"component": dcc.Input,
"props": {},
},
"nested-children": {
Expand All @@ -112,21 +137,29 @@
"nested-prop-failure": {
"fail": True,
"name": "nested string instead of number/null",
"component": dcc.Graph,
"component": DataTable,
"props": {
"figure": {"data": [{}]},
"config": {
"toImageButtonOptions": {"width": None, "height": "test"}
},
"columns": [{
"id": "id",
"name": "name",
"format": {
"prefix": "asdf"
}
}]
},
},
"allow-null": {
"fail": False,
"name": "nested null",
"component": dcc.Graph,
"component": DataTable,
"props": {
"figure": {"data": [{}]},
"config": {"toImageButtonOptions": {"width": None, "height": None}},
"columns": [{
"id": "id",
"name": "name",
"format": {
"prefix": None
}
}]
},
},
"allow-null-2": {
Expand Down

0 comments on commit 13e274e

Please sign in to comment.