Skip to content

Commit 10681dc

Browse files
committed
fixing issues with relativate paths
1 parent 7bf69a7 commit 10681dc

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

dash/server_factories/fastapi_factory.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,8 @@ async def serve(request: Request, package_name: str, fingerprinted_path: str):
219219
dash_app, package_name, fingerprinted_path, request
220220
)
221221

222-
self.add_url_rule(
223-
app,
224-
"/_dash-component-suites/{package_name}/{fingerprinted_path:path}",
222+
dash_app._add_url(
223+
"/_dash-component-suites/<string:package_name>/<path:fingerprinted_path>",
225224
serve,
226225
)
227226

dash/server_factories/flask_factory.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ def serve(package_name, fingerprinted_path):
121121
dash_app, package_name, fingerprinted_path
122122
)
123123

124-
self.add_url_rule(
125-
app,
124+
dash_app._add_url(
126125
"/_dash-component-suites/<string:package_name>/<path:fingerprinted_path>",
127126
serve,
128127
)

tests/integration/multi_page/test_pages_relative_path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_pare002_relative_path_with_url_base_pathname(
7171
for page in dash.page_registry.values():
7272
dash_br.find_element("#" + page["id"]).click()
7373
dash_br.wait_for_text_to_equal("#text_" + page["id"], "text for " + page["id"])
74-
assert dash_br.driver.title == page["title"], "check that page title updates"
74+
until(lambda: dash_br.driver.title == page["title"], timeout=3)
7575

7676
assert dash_br.get_logs() == [], "browser console should contain no error"
7777

0 commit comments

Comments
 (0)