Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit a0d0643

Browse files
committed
Change CHANGELOG, add empty graph test.
1 parent 67e0064 commit a0d0643

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [0.28.1]
5+
## [0.28.1] - 2018-08-29
6+
### Changed
7+
- `candlestick` and `OHLC` charts are now plotted using the `Plotly.react` method instead of the `Plotly.newPlot` method.
68
### Fixed
79
- Fix bug where front-end error was thrown when setting `Graph.figure = {}` (fixes [#260]).
810

test/test_integration.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import dash_html_components as html
1313
import dash_core_components as dcc
1414
import dash_table_experiments as dt
15-
from selenium import webdriver
1615
from selenium.webdriver.common.keys import Keys
1716
from selenium.common.exceptions import InvalidElementStateException
1817

@@ -851,3 +850,30 @@ def on_click(n_clicks):
851850
time.sleep(2)
852851

853852
self.driver.switch_to.alert.accept()
853+
854+
def test_empty_graph(self):
855+
app = dash.Dash(__name__)
856+
857+
app.layout = html.Div([
858+
html.Button(id='click', children='Click me'),
859+
dcc.Graph(
860+
id='graph',
861+
figure={
862+
'data': dict(x=[1, 2, 3], y=[1, 2, 3])
863+
}
864+
)
865+
])
866+
867+
@app.callback(dash.dependencies.Output('graph', 'figure'),
868+
[dash.dependencies.Input('click', 'n_clicks')],
869+
[dash.dependencies.State('graph', 'figure')])
870+
def render_content(click, prev_graph):
871+
if click:
872+
return {}
873+
return prev_graph
874+
875+
self.startServer(app=app)
876+
button = self.wait_for_element_by_css_selector('#click')
877+
button.click()
878+
time.sleep(2) # Wait for graph to re-render
879+
self.snapshot('render-empty-graph')

0 commit comments

Comments
 (0)