This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added title prop * Added changelog entry * Adding basic test
- Loading branch information
1 parent
f32a236
commit eb4c98e
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
import dash | ||
from dash.dependencies import Input, Output | ||
import dash_core_components as dcc | ||
import dash_html_components as html | ||
|
||
|
||
@pytest.mark.DCC768 | ||
def test_liti001_prop(dash_dcc): | ||
app = dash.Dash(__name__) | ||
app.layout = html.Div( | ||
[ | ||
dcc.Link("page 1", id="link1", href="/page-1", title="This is a test title!"), | ||
dcc.Location(id="url", refresh=False), | ||
html.Div(id="content") | ||
] | ||
) | ||
@app.callback(Output("content", "children"), [Input("link1", "title")]) | ||
def display_title(title): | ||
return title | ||
|
||
dash_dcc.start_server(app) | ||
|
||
title_exists = dash_dcc.find_element('#link1').get_attribute('title') | ||
|
||
assert title_exists == "This is a test title!" |