|
2 | 2 | import flask
|
3 | 3 | import json
|
4 | 4 | import pytest
|
5 |
| -import re |
6 | 5 |
|
7 | 6 | from bs4 import BeautifulSoup
|
8 | 7 |
|
9 |
| -import dash_dangerously_set_inner_html |
10 |
| -import dash_flow_example |
11 |
| - |
12 | 8 | import dash
|
13 | 9 | from dash import Dash, html, dcc, Input, Output
|
14 | 10 | from dash.exceptions import PreventUpdate
|
@@ -48,67 +44,6 @@ def test_inin003_wildcard_data_attributes(dash_duo):
|
48 | 44 | assert dash_duo.get_logs() == []
|
49 | 45 |
|
50 | 46 |
|
51 |
| -def test_inin004_no_props_component(dash_duo): |
52 |
| - app = Dash() |
53 |
| - app.layout = html.Div( |
54 |
| - [ |
55 |
| - dash_dangerously_set_inner_html.DangerouslySetInnerHTML( |
56 |
| - """ |
57 |
| - <h1>No Props Component</h1> |
58 |
| - """ |
59 |
| - ) |
60 |
| - ], |
61 |
| - id="app", |
62 |
| - ) |
63 |
| - |
64 |
| - dash_duo.start_server(app) |
65 |
| - |
66 |
| - assert dash_duo.get_logs() == [] |
67 |
| - assert dash_duo.find_element("h1").text == "No Props Component" |
68 |
| - |
69 |
| - inner = dash_duo.find_element("#app").get_property("innerHTML") |
70 |
| - expected = "<div> <h1>No Props Component</h1> </div>" |
71 |
| - assert re.sub("\\s+", " ", inner) == expected |
72 |
| - |
73 |
| - |
74 |
| -def test_inin005_flow_component(dash_duo): |
75 |
| - app = Dash() |
76 |
| - |
77 |
| - app.layout = html.Div( |
78 |
| - [ |
79 |
| - dash_flow_example.ExampleReactComponent( |
80 |
| - id="react", value="my-value", label="react component" |
81 |
| - ), |
82 |
| - dash_flow_example.ExampleFlowComponent( |
83 |
| - id="flow", value="my-value", label="flow component" |
84 |
| - ), |
85 |
| - html.Hr(), |
86 |
| - html.Div(id="output"), |
87 |
| - ] |
88 |
| - ) |
89 |
| - |
90 |
| - @app.callback( |
91 |
| - Output("output", "children"), [Input("react", "value"), Input("flow", "value")] |
92 |
| - ) |
93 |
| - def display_output(react_value, flow_value): |
94 |
| - return html.Div( |
95 |
| - [ |
96 |
| - "You have entered {} and {}".format(react_value, flow_value), |
97 |
| - html.Hr(), |
98 |
| - html.Label("Flow Component Docstring"), |
99 |
| - html.Pre(dash_flow_example.ExampleFlowComponent.__doc__), |
100 |
| - html.Hr(), |
101 |
| - html.Label("React PropTypes Component Docstring"), |
102 |
| - html.Pre(dash_flow_example.ExampleReactComponent.__doc__), |
103 |
| - html.Div(id="waitfor"), |
104 |
| - ] |
105 |
| - ) |
106 |
| - |
107 |
| - dash_duo.start_server(app) |
108 |
| - dash_duo.wait_for_element("#waitfor") |
109 |
| - dash_duo.percy_snapshot(name="flowtype") |
110 |
| - |
111 |
| - |
112 | 47 | def test_inin006_meta_tags(dash_duo):
|
113 | 48 | metas = [
|
114 | 49 | {"name": "description", "content": "my dash app"},
|
|
0 commit comments