Close autocomplete dropdown when focus leaves the wrapper #42
Annotations
2 errors
|
test
Process completed with exit code 1.
|
|
src/components/SettingsModal.test.tsx > SettingsModal > cancel calls onClose:
src/components/SettingsModal.test.tsx#L45
TestingLibraryElementError: Unable to find an element with the text: Cancel. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="_overlay_53452f"
role="presentation"
>
<div
aria-labelledby="settings-title"
aria-modal="true"
class="_modal_53452f"
role="dialog"
tabindex="-1"
>
<div
class="_header_53452f"
>
<h3
class="_title_53452f"
id="settings-title"
>
Settings
</h3>
<button
aria-label="Close"
class="_closeButton_53452f"
>
×
</button>
</div>
<fieldset
class="_fieldset_53452f"
>
<legend
class="_legend_53452f"
>
Theme
</legend>
<div
class="_segmented_53452f"
>
<label>
<input
checked=""
name="theme"
type="radio"
/>
<span>
System
</span>
</label>
<label>
<input
name="theme"
type="radio"
/>
<span>
Light
</span>
</label>
<label>
<input
name="theme"
type="radio"
/>
<span>
Dark
</span>
</label>
</div>
</fieldset>
<fieldset
class="_fieldset_53452f"
>
<legend
class="_legend_53452f"
>
Timespan format
</legend>
<div
class="_optionList_53452f"
>
<label>
<input
name="format"
type="radio"
/>
<span>
Days
</span>
</label>
<label>
<input
name="format"
type="radio"
/>
<span>
Years only
</span>
</label>
<label>
<input
checked=""
name="format"
type="radio"
/>
<span>
Precise (years, months, days)
</span>
</label>
</div>
</fieldset>
<button
class="_saveButton_53452f"
disabled=""
>
Save
</button>
</div>
</div>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/components/SettingsModal.test.tsx:45:28
|