Skip to content

Commit

Permalink
Modifies loading component test to include id
Browse files Browse the repository at this point in the history
  • Loading branch information
leeagustin committed Jun 18, 2024
1 parent 9dcf243 commit ca5d66a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def test_ldcp001_loading_component_initialization(dash_dcc):
app = Dash(__name__)

app.layout = html.Div(
[dcc.Loading([html.Div(id="div-1")], className="loading")], id="root"
[dcc.Loading([html.Div(id="div-1")], id="loading", className="loading")],
id="root",
)

@app.callback(Output("div-1", "children"), [Input("root", "n_clicks")])
Expand All @@ -20,7 +21,7 @@ def updateDiv(children):

with lock:
dash_dcc.start_server(app)
dash_dcc.find_element(".loading .dash-spinner")
dash_dcc.find_element("#loading .loading .dash-spinner")
# ensure inner component is also mounted
dash_dcc.wait_for_text_to_equal("#div-1", "")

Expand Down

0 comments on commit ca5d66a

Please sign in to comment.