Skip to content

Commit dc79929

Browse files
Fix e2e tests & bump dash version to master (#120)
1 parent 0e98994 commit dc79929

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
sudo pip install virtualenv --upgrade
3030
python -m venv venv || virtualenv venv
3131
. venv/bin/activate
32+
pip install -e .
3233
pip install -r dev-requirements.txt --quiet
34+
pip list | grep dash
3335
npm install --ignore-scripts
3436
3537
- run:
@@ -74,4 +76,4 @@ workflows:
7476
jobs:
7577
- "python-2.7"
7678
- "python-3.6"
77-
- "python-3.7"
79+
- "python-3.7"

dev-requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
dash_core_components==0.33.0
2-
dash_html_components==0.11.0rc5
3-
dash==0.32.0
1+
git+git://github.com/plotly/dash@master#egg=dash
42
percy
53
selenium
64
mock

tests/test_render.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import re
1616
import itertools
1717
import json
18-
18+
from selenium.webdriver.common.keys import Keys
19+
from selenium.webdriver import ActionChains
1920

2021
class Tests(IntegrationTests):
2122
def setUp(self):
@@ -486,9 +487,13 @@ def update_output(value):
486487
self.percy_snapshot(name='simple-callback-1')
487488

488489
input1 = self.wait_for_element_by_css_selector('#input')
489-
input1.clear()
490+
initialValue = input1.get_attribute('value')
491+
492+
action = ActionChains(self.driver)
493+
action.click(input1)
494+
action = action.send_keys(Keys.BACKSPACE * len(initialValue))
490495

491-
input1.send_keys('hello world')
496+
action.send_keys('hello world').perform()
492497

493498
self.wait_for_text_to_equal('#output-1', 'hello world')
494499
self.percy_snapshot(name='simple-callback-2')
@@ -497,6 +502,8 @@ def update_output(value):
497502
call_count.value,
498503
# an initial call to retrieve the first value
499504
1 +
505+
# delete the initial value
506+
len(initialValue) +
500507
# one for each hello world character
501508
len('hello world')
502509
)
@@ -612,6 +619,7 @@ def update_input(value):
612619
def test_radio_buttons_callbacks_generating_children(self):
613620
self.maxDiff = 100 * 1000
614621
app = Dash(__name__)
622+
615623
app.layout = html.Div([
616624
dcc.RadioItems(
617625
options=[
@@ -757,7 +765,7 @@ def generic_chapter_assertions(chapter):
757765
self.driver.execute_script(
758766
'return document.'
759767
'getElementById("{}-graph").'.format(chapter) +
760-
'layout.title'
768+
'layout.title.text'
761769
) == value
762770
)
763771
)
@@ -1986,7 +1994,7 @@ def render_content(tab):
19861994
self.wait_for_text_to_equal('#graph2_info', json.dumps(graph_2_expected_clickdata))
19871995

19881996
def test_hot_reload(self):
1989-
app = dash.Dash(__name__, assets_folder='tests/test_assets')
1997+
app = dash.Dash(__name__, assets_folder='test_assets')
19901998

19911999
app.layout = html.Div([
19922000
html.H3('Hot reload')

0 commit comments

Comments
 (0)