Skip to content

Commit 88391b4

Browse files
committed
fix test
1 parent d689206 commit 88391b4

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

components/dash-core-components/src/components/Checklist.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import React, {useMemo} from 'react';
2-
import {append, includes, without} from 'ramda';
32
import {ChecklistProps, PersistedProps, PersistenceTypes} from '../types';
43
import './css/checklist.css';
54

65
import {sanitizeOptions} from '../utils/optionTypes';
76
import LoadingElement from '../utils/_LoadingElement';
8-
import {Option, OptionsList} from '../utils/optionRendering';
7+
import {OptionsList} from '../utils/optionRendering';
98

109
/**
1110
* Checklist is a component that encapsulates several checkboxes.

components/dash-core-components/src/utils/optionRendering.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export const Option: React.FC<OptionProps> = ({
8484
role="option"
8585
aria-selected={isSelected}
8686
style={optionStyle}
87-
title={option.title}
8887
>
8988
<input
9089
type={inputType}
@@ -100,7 +99,11 @@ export const Option: React.FC<OptionProps> = ({
10099
className={inputClassNames.join(' ')}
101100
style={inputStyle}
102101
/>
103-
<span className={labelClassNames.join(' ')} style={labelStyle}>
102+
<span
103+
className={labelClassNames.join(' ')}
104+
style={labelStyle}
105+
title={option.title}
106+
>
104107
<OptionLabel {...option} index={index} />
105108
</span>
106109
</label>

tests/integration/renderer/test_component_as_prop.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,13 @@ def demo(n_clicks):
358358

359359
dash_duo.wait_for_element("#add-option").click()
360360
for i in range(1, n + 2):
361-
dash_duo.wait_for_text_to_equal(f"#options label:nth-child({i}) span", "")
361+
dash_duo.wait_for_text_to_equal(
362+
f"#options label:nth-child({i}) span.label-result", ""
363+
)
362364
dash_duo.wait_for_element(f"#options label:nth-child({i}) button").click()
363-
dash_duo.wait_for_text_to_equal(f"#options label:nth-child({i}) span", "1")
365+
dash_duo.wait_for_text_to_equal(
366+
f"#options label:nth-child({i}) span.label-result", "1"
367+
)
364368

365369

366370
@flaky(max_runs=3)

0 commit comments

Comments
 (0)