Skip to content

Commit 522b8c9

Browse files
committed
fix browser size in tests
1 parent 6cefd88 commit 522b8c9

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

components/dash-core-components/src/components/css/tabs.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545

4646
/* Tab disabled state */
4747
.tab--disabled {
48-
color: #d6d6d6;
48+
opacity: 0.6;
49+
cursor: not-allowed;
4950
}
5051

5152
/* Tab content area */

components/dash-core-components/tests/integration/tab/test_tabs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_tabs001_in_vertical_mode(dash_dcc):
3434
]
3535
)
3636

37+
dash_dcc.driver.set_window_size(800, 600)
3738
dash_dcc.start_server(app)
3839
dash_dcc.wait_for_text_to_equal("#tab-3", "Tab three")
3940
dash_dcc.percy_snapshot("Core Tabs - vertical mode")
@@ -67,6 +68,7 @@ def render_content(tab):
6768
elif tab == "tab-2":
6869
return html.Div([html.H3("Test content 2")], id="test-tab-2")
6970

71+
dash_dcc.driver.set_window_size(800, 600)
7072
dash_dcc.start_server(app)
7173
dash_dcc.wait_for_text_to_equal("#tabs-content", "Test content 2")
7274
dash_dcc.percy_snapshot("Core initial tab - tab 2")
@@ -87,6 +89,7 @@ def test_tabs003_without_children_undefined(dash_dcc):
8789
id="app",
8890
)
8991

92+
dash_dcc.driver.set_window_size(800, 600)
9093
dash_dcc.start_server(app)
9194
dash_dcc.wait_for_element("#tabs-content")
9295
assert dash_dcc.find_element("#app").text == "Dash Tabs component demo"
@@ -122,6 +125,7 @@ def render_content(tab):
122125
elif tab == "tab-2":
123126
return html.H3("Tab content 2")
124127

128+
dash_dcc.driver.set_window_size(800, 600)
125129
dash_dcc.start_server(app)
126130
dash_dcc.wait_for_text_to_equal("#tabs-content", "Default selected Tab content 1")
127131
assert dash_dcc.get_logs() == []
@@ -155,6 +159,7 @@ def test_tabs005_disabled(dash_dcc):
155159
]
156160
)
157161

162+
dash_dcc.driver.set_window_size(800, 600)
158163
dash_dcc.start_server(app)
159164

160165
dash_dcc.wait_for_element("#tab-2")

components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def render_content(tab):
6464
]
6565
)
6666

67+
dash_dcc.driver.set_window_size(800, 600)
6768
dash_dcc.start_server(app)
6869

6970
tab_one = dash_dcc.wait_for_element("#tab-1")
@@ -156,6 +157,7 @@ def on_click_update_graph(n_clicks):
156157
"layout": {"width": 700, "height": 450},
157158
}
158159

160+
dash_dcc.driver.set_window_size(800, 600)
159161
dash_dcc.start_server(app)
160162

161163
button_one = dash_dcc.wait_for_element("#one")

0 commit comments

Comments
 (0)