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 147
Added title prop to dcc.Link #768
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9bd22fc
Added title prop
HammadTheOne b45f7e1
Format changes
HammadTheOne 6e49163
Merge branch 'dev' into 586-link-title-prop
HammadTheOne 8cc6abb
Added changelog entry.
HammadTheOne 31720e7
Adding basic test
HammadTheOne 8e17ded
Updated basic test
HammadTheOne 804da4a
Fixed integration test
HammadTheOne 3de70d2
Update tests/integration/link/test_title_prop.py
HammadTheOne 86ef9c3
Merge branch 'dev' into 586-link-title-prop
HammadTheOne f80f844
Updating test
HammadTheOne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,30 @@ | ||
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.driver.execute_script( | ||
''' | ||
return document.getElementById("link1").getAttribute("title"); | ||
''' | ||
) | ||
|
||
assert title_exists == "This is a test title!" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in f80f844. This works, thank you for the suggestion.