Skip to content

Commit 6200784

Browse files
committed
tweak rdif001 - simpler and more info
1 parent 416e251 commit 6200784

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/integration/renderer/test_iframe.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from multiprocessing import Value
2-
31
import dash
42
from dash.dependencies import Input, Output
53
from dash.exceptions import PreventUpdate
@@ -9,7 +7,6 @@
97

108
def test_rdif001_sandbox_allow_scripts(dash_duo):
119
app = dash.Dash(__name__)
12-
call_count = Value("i")
1310

1411
N_OUTPUTS = 50
1512

@@ -26,7 +23,6 @@ def update_output(n_clicks):
2623
if n_clicks is None:
2724
raise PreventUpdate
2825

29-
call_count.value += 1
3026
return ["{}={}".format(i, i + n_clicks) for i in range(N_OUTPUTS)]
3127

3228
@app.server.after_request
@@ -39,6 +35,11 @@ def apply_cors(response):
3935

4036
dash_duo.start_server(app)
4137

38+
dash_duo.find_element("#btn").click()
39+
dash_duo.wait_for_element("#output-0").text == "0=1"
40+
41+
assert dash_duo.get_logs() == []
42+
4243
iframe = """
4344
<!DOCTYPE html>
4445
<html>
@@ -53,8 +54,9 @@ def apply_cors(response):
5354

5455
dash_duo.driver.switch_to.frame(0)
5556

56-
dash_duo.wait_for_element("#output-0")
57-
dash_duo.wait_for_element_by_id("btn").click()
58-
dash_duo.wait_for_element("#output-0").text == "0=1"
57+
assert dash_duo.get_logs() == []
58+
59+
dash_duo.find_element("#btn").click()
60+
dash_duo.wait_for_text_to_equal("#output-0", "0=1")
5961

6062
assert dash_duo.get_logs() == []

0 commit comments

Comments
 (0)