This repository was archived by the owner on Jun 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 143
Check if figure has 'data' member set #224
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9d79206
Check if figure has 'data' member set
valentijnnieman ee41fed
Assert graph renders without data
valentijnnieman c63362f
See if time.sleep(2) helps CircleCI
valentijnnieman 4c56d62
Rebuild bundle.js
valentijnnieman 368ecc7
Replace wait_for_element by driver.find for failing test.
T4rk1n e8b33b1
Replace wait_for_element by WebDriverWait for failing test.
T4rk1n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.23.0' | ||
__version__ = '0.23.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,15 @@ | |
import dash_core_components as dcc | ||
import dash_table_experiments as dt | ||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
from selenium.webdriver.common.keys import Keys | ||
from selenium.common.exceptions import InvalidElementStateException | ||
import time | ||
from textwrap import dedent | ||
|
||
from selenium.webdriver.support import expected_conditions | ||
from selenium.webdriver.support.wait import WebDriverWait | ||
|
||
try: | ||
from urlparse import urlparse | ||
except ImportError: | ||
|
@@ -528,3 +533,22 @@ def update_graph(n_clicks): | |
button.click() | ||
time.sleep(2) | ||
self.snapshot('candlestick - 2 click') | ||
|
||
def test_graph_without_data(self): | ||
app = dash.Dash(__name__) | ||
|
||
app.layout = html.Div([ | ||
dcc.Graph(id='graph', figure={ | ||
}) | ||
]) | ||
|
||
self.startServer(app=app) | ||
|
||
graph_rendered = WebDriverWait(self.driver, 10).until( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you tried bumping this up to like, 20? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, didn't change, should put a percy snapshot before the wait so we can see if the graph is actually there. |
||
expected_conditions.presence_of_element_located((By.ID, 'graph')) | ||
) | ||
|
||
self.assertTrue(graph_rendered) | ||
|
||
self.snapshot('graph without figure.data') | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here - let's use the full link to the issue #223