Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 8c19bdd

Browse files
Graph test that tests no duplicate id's if no id set
1 parent ef7e193 commit 8c19bdd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test_integration.py

+14
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,20 @@ def test_graphs_with_different_figures(self):
900900

901901
self.snapshot('2 graphs with different figures')
902902

903+
def test_graphs_without_ids(self):
904+
app = dash.Dash(__name__)
905+
app.layout = html.Div([
906+
dcc.Graph(className='graph-no-id-1'),
907+
dcc.Graph(className='graph-no-id-2'),
908+
])
909+
910+
self.startServer(app=app)
911+
912+
graph_1 = self.wait_for_element_by_css_selector('.graph-no-id-1')
913+
graph_2 = self.wait_for_element_by_css_selector('.graph-no-id-2')
914+
915+
self.assertNotEqual(graph_1.get_attribute('id'), graph_2.get_attribute('id'))
916+
903917
def test_datepickerrange_updatemodes(self):
904918
app = dash.Dash(__name__)
905919

0 commit comments

Comments
 (0)