OverviewView.spec.js failed occasionally
FAIL src/components/entry/OverviewView.spec.js (553.988 s)
● eln concurrent editing
TestingLibraryElementError: Found multiple elements with the title: Save entry.
Here are the matching elements:
Ignored nodes: comments, script, style
<svg
aria-hidden="true"
class="MuiSvgIcon-root"
focusable="false"
title="Save entry"
viewBox="0 0 24 24"
>
<path
d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"
/>
</svg>
Ignored nodes: comments, script, style
<svg
aria-hidden="true"
class="MuiSvgIcon-root"
focusable="false"
title="Save entry"
viewBox="0 0 24 24"
>
<path
d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"
/>
</svg>
(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).
Ignored nodes: comments, script, style
<body
style="padding-right: 0px; overflow: hidden;"
>
<svg
aria-hidden="true"
id="js-plotly-tester"
style="position: absolute; left: -10000px; top: -10000px; width: 9000px; height: 9000px; z-index: 1;"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<path
class="js-reference-point"
d="M0,0H1V1H0Z"
style="stroke-width: 0; fill: black;"
/>
</svg>
<div
aria-hidden="true"
>
<div
class="makeStyles-fullHeight-1144"
>
<div
class="makeStyles-limitedWidth-1142"
>
<div
class="MuiGrid-root makeStyles-root-1136 MuiGrid-container"
>
<div
class="MuiGrid-root makeStyles-leftColumn-1137 MuiGrid-item MuiGrid-grid-xs-4"
>
<div
class="MuiBox-root MuiBox-root-1145"
>
<div
class="MuiTypography-root MuiTypography-body1"
>
<div
class="MuiBox-root MuiBox-root-1146"
>
Metadata
</div>
</div>
<div
class="makeStyles-flex-1157"
data-testid="quantity-undefined"
>
<div
class="makeStyles-root-1147"
data-testid="quantity-entry_type"
style="max-width: 280px;"
>
<span
class="MuiTypography-root makeStyles-label-1158 MuiTypography-caption MuiTypography-noWrap"
>
type
</span>
<div
class="makeStyles-valueContainer-1148"
>
<p
class="MuiTypography-root makeStyles-value-1149 MuiTypography-body1 MuiTypography-noWrap"
title="The main schema definition. This is the name of the section used for data."
>
Sample
</p>
</div>
</div>
<div
class="makeStyles-root-1147"
data-testid="quantity-entry_name"
style="max-width: 280px;"
>
<span
class="MuiTypography-root makeStyles-label-1158 MuiTypography-caption MuiTypography-noWrap"
>
name
</span>
<div
class="makeStyles-valueContainer-1148"
>
<p
class="MuiTypography-root makeStyles-value-1149 MuiTypography-body1 MuiTypography-noWrap"
title="A brief human readable name for the entry."
>
ref3.archive.yaml
</p>
</div>
</div>
</div>
</div>
<hr
class="MuiDivider-root makeStyles-divider-1140"
/>
<div
class="MuiBox-root MuiBox-root-1160"
>
<div
class="makeStyles-flex-1157"
data-testid="quantity-undefined"
>
<div
class="makeStyles-root-1147"
data-testid="quantity-comment"
style="max-width: 280px;"
>
<span
class="MuiTypography-root makeStyles-label-1158 MuiTypography-caption MuiTypography-noWrap"
>
comment
</span>
<div
class="makeStyles-valueContainer-1148"
>
<p
class="MuiTypography-root makeStyles-value-1149 MuiTypography-body1"
title="A user provided comment for this entry"
>
<i>
no comment
</i>
</p>
</div>
</div>
<div
class="makeStyles-root-1147"
data-testid="quantity-references"
style="max-width: 280px;"
>
<span
class="MuiTypography-root makeStyles-label-1158 MuiTypography-caption MuiTypography-noWrap"
>
references
</span>
<div
class="makeStyles-valueContainer-1148"
>
<div
class=""
style="display: inline-grid;"
title="User provided references (URLs) for this entry"
/>
</div>
</div>
<div...
350 | await screen2.findByTitle('Save entry')
351 |
> 352 | const saveButton2 = screen2.getByTitle('Save entry').closest('button')
| ^
353 | expect(saveButton2).toBeInTheDocument()
354 | expect(saveButton2).toBeDisabled()
355 |
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:40:19)
at getElementError (node_modules/@testing-library/dom/dist/query-helpers.js:25:35)
at getMultipleElementsFoundError (node_modules/@testing-library/dom/dist/query-helpers.js:29:10)
at query (node_modules/@testing-library/dom/dist/query-helpers.js:66:13)
at getByTitle (node_modules/@testing-library/dom/dist/query-helpers.js:111:19)
at src/components/entry/OverviewView.spec.js:352:31