feat(fluentUI-migration): ActionButton fluentui v8 to v9 migration #8020
Annotations
10 errors
src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx#L50
expect(received).toMatchSnapshot()
Snapshot name: `CommandBarButtonsMenu renders CommandBarButtonsMenu 1`
- Snapshot - 43
+ Received + 11
@@ -2,13 +2,15 @@
<mock-tooltip
content="More actions"
relationship="label"
>
<mock-menu
- persistonitemclick="true"
+ open="false"
>
- <mock-menutrigger>
+ <mock-menutrigger
+ disablebuttonenhancement="true"
+ >
<mock-menubutton
appearance="transparent"
aria-label="More actions"
classname="commandBarButtonsMenuButton"
icon="[object Object]"
@@ -18,54 +20,20 @@
style="border-radius: unset !important;"
>
<mock-menulist
classname="menuList"
>
- <mock-menuitem
- buttonref="[object Object]"
- classname="menuItem"
- hassubmenu="false"
- loadassessmentbutton="[object Object]"
- saveassessmentbutton="[object Object]"
- transfertoassessmentbutton="[object Object]"
- >
- <div>
+ <span>
Save assessment button
- </div>
- </mock-menuitem>
- <mock-menuitem
- buttonref="[object Object]"
- classname="menuItem"
- hassubmenu="false"
- loadassessmentbutton="[object Object]"
- saveassessmentbutton="[object Object]"
- transfertoassessmentbutton="[object Object]"
- >
- <div>
+ </span>
+ <span>
Load assessment button
- </div>
- </mock-menuitem>
- <mock-menuitem
- buttonref="[object Object]"
- classname="menuItem"
- hassubmenu="false"
- loadassessmentbutton="[object Object]"
- saveassessmentbutton="[object Object]"
- transfertoassessmentbutton="[object Object]"
- >
- <div>
+ </span>
+ <span>
Transfer to assessment button
- </div>
- </mock-menuitem>
- <mock-menuitem
- buttonref="[object Object]"
- classname="menuItem"
- hassubmenu="false"
- loadassessmentbutton="[object Object]"
- saveassessmentbutton="[object Object]"
- transfertoassessmentbutton="[object Object]"
- />
+ </span>
+ <span />
</mock-menulist>
</mock-menupopover>
</mock-menu>
</mock-tooltip>
</DocumentFragment>
at Object.toMatchSnapshot (src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx:50:38)
at runMicrotasks (<anonymous>)
|
src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx#L78
MockException: expected invocation of Function() exactly 1 times, invoked 2 times
Configured setups:
Function(), once
Performed invocations:
Function()
Function()
at MockException.Exception [as constructor] (node_modules/typemoq/dist/Error/Error/Error/Exception.ts:3:9)
at new MockException (node_modules/typemoq/dist/Error/Error/Error/MockException.ts:20:9)
at InterceptorExecute.Object.<anonymous>.InterceptorExecute.throwVerifyCallCountException (node_modules/typemoq/dist/InterceptorExecute.ts:75:17)
at InterceptorExecute.Object.<anonymous>.InterceptorExecute.verifyCallCount (node_modules/typemoq/dist/InterceptorExecute.ts:64:18)
at InterceptorExecute.Object.<anonymous>.InterceptorExecute.verify (node_modules/typemoq/dist/InterceptorExecute.ts:51:18)
at StaticMock.Object.<anonymous>.MockBase.verifyAll (node_modules/typemoq/dist/MockBase.ts:61:31)
at Object.verifyAll (src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx:78:41)
|
src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx#L73
expect(received).toMatchSnapshot(hint)
Snapshot name: `CommandBarButtonsMenu renders all child buttons with hasSubMenu false,: render export report menuitem 1`
- Snapshot - 2
+ Received + 2
- <div>
+ <span>
Report export button
- </div>
+ </span>
at Object.toMatchSnapshot (src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx:73:33)
|
src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx#L74
expect(received).toMatchSnapshot(hint)
Snapshot name: `CommandBarButtonsMenu renders all child buttons with hasSubMenu false,: render save assessment menuitem 1`
- Snapshot - 2
+ Received + 2
- <div>
+ <span>
Save assessment button
- </div>
+ </span>
at Object.toMatchSnapshot (src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx:74:31)
|
src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx#L75
expect(received).toMatchSnapshot(hint)
Snapshot name: `CommandBarButtonsMenu renders all child buttons with hasSubMenu false,: render load assessment menuitem 1`
- Snapshot - 2
+ Received + 2
- <div>
+ <span>
Load assessment button
- </div>
+ </span>
at Object.toMatchSnapshot (src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx:75:31)
|
src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx#L76
expect(received).toMatchSnapshot(hint)
Snapshot name: `CommandBarButtonsMenu renders all child buttons with hasSubMenu false,: render transfer to assessment menuitem 1`
- Snapshot - 2
+ Received + 2
- <div>
+ <span>
Transfer to assessment button
- </div>
+ </span>
at Object.toMatchSnapshot (src/tests/unit/tests/DetailsView/components/command-bar-buttons-menu.test.tsx:76:35)
|
src/tests/unit/tests/DetailsView/components/load-assessment-button.test.tsx#L68
expect(received).toMatchSnapshot()
Snapshot name: `LoadAssessmentButton should render per the snapshot 1`
- Snapshot - 1
+ Received + 1
@@ -1,8 +1,8 @@
<DocumentFragment>
<mock-insightscommandbutton
- classname="___q8bhkh0_0000000 f1t6ax4o fmntwad f1g8o529 f9hdeju f139oj5f f7otkfg"
+ classname="___1r20z3h_0000000 f1t6ax4o fmntwad fgslppp f9hdeju f139oj5f f7otkfg"
data-automation-id="load-assessment-button"
insightscommandbuttoniconprops="[object Object]"
>
Load assessment
</mock-insightscommandbutton>
at Object.toMatchSnapshot (src/tests/unit/tests/DetailsView/components/load-assessment-button.test.tsx:68:43)
at runMicrotasks (<anonymous>)
|
src/tests/unit/mock-helpers/mock-module-helpers.tsx#L101
expect(received).toMatchSnapshot(hint)
Snapshot name: `LoadAssessmentButton should render per the snapshot: InsightsCommandButton props 1`
- Snapshot - 1
+ Received + 1
@@ -1,8 +1,8 @@
{
"children": "Load assessment",
- "className": "___q8bhkh0_0000000 f1t6ax4o fmntwad f1g8o529 f9hdeju f139oj5f f7otkfg",
+ "className": "___1r20z3h_0000000 f1t6ax4o fmntwad fgslppp f9hdeju f139oj5f f7otkfg",
"data-automation-id": "load-assessment-button",
"insightsCommandButtonIconProps": {
"icon": <FluentUIV9Icon
iconName="FolderOpenRegular"
/>,
at toMatchSnapshot (src/tests/unit/mock-helpers/mock-module-helpers.tsx:101:71)
at expectMockedComponentPropsToMatchSnapshot (src/tests/unit/mock-helpers/mock-module-helpers.tsx:14:9)
at Array.forEach (<anonymous>)
at forEach (src/tests/unit/mock-helpers/mock-module-helpers.tsx:9:16)
at Object.<anonymous> (src/tests/unit/tests/DetailsView/components/load-assessment-button.test.tsx:69:51)
at runMicrotasks (<anonymous>)
|
src/tests/unit/tests/DetailsView/components/load-assessment-button.test.tsx#L78
TestingLibraryElementError: Unable to find an accessible element with the role "button"
Here are the accessible roles:
menuitem:
Name "Load assessment":
<div
class="fui-MenuItem r11normc ___1r20z3h_r66yq00 f1t6ax4o fmntwad fgslppp f9hdeju f139oj5f f7otkfg"
data-automation-id="load-assessment-button"
role="menuitem"
tabindex="0"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<div
class="fui-MenuItem r11normc ___1r20z3h_r66yq00 f1t6ax4o fmntwad fgslppp f9hdeju f139oj5f f7otkfg"
data-automation-id="load-assessment-button"
role="menuitem"
tabindex="0"
>
<span
class="fui-MenuItem__icon r9c34qo"
>
<svg
aria-hidden="true"
class="___134f6oe_gm9x020 f1w7gpdv fez10in fg4l7m0 fq3bhnu"
fill="currentColor"
height="1em"
viewBox="0 0 20 20"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3 5.5v6.6l1.5-2.6A3 3 0 0 1 7.1 8H15v-.5c0-.83-.67-1.5-1.5-1.5h-4a.5.5 0 0 1-.35-.15l-1.71-1.7A.5.5 0 0 0 7.09 4H4.5C3.67 4 3 4.67 3 5.5Zm1.28 10.48.22.02h9.4a2 2 0 0 0 1.73-1l2.17-3.75A1.5 1.5 0 0 0 16.5 9H7.1a2 2 0 0 0-1.73 1L3.2 13.75a1.5 1.5 0 0 0 1.08 2.23ZM2 14.46V5.5A2.5 2.5 0 0 1 4.5 3h2.59c.4 0 .78.16 1.06.44L9.7 5h3.79A2.5 2.5 0 0 1 16 7.5V8h.5a2.5 2.5 0 0 1 2.16 3.75L16.5 15.5a3 3 0 0 1-2.6 1.5H4.5a2.54 2.54 0 0 1-1.62-.6A2.5 2.5 0 0 1 2 14.46Z"
fill="currentColor"
/>
</svg>
</span>
<span
class="fui-MenuItem__content r1ls86vo"
>
Load assessment
</span>
</div>
</div>
</body>
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByRole (src/tests/unit/tests/DetailsView/components/load-assessment-button.test.tsx:78:44)
|
src/tests/unit/tests/common/components/controls/insights-command-button.test.tsx#L34
expect(received).toMatchSnapshot()
Snapshot name: `InsightsCommandButton renders per snapshot with props passed through 1`
- Snapshot - 10
+ Received + 1
- <DocumentFragment>
- <mock-button
- appearance="transparent"
- classname=""
- icon="[object Object]"
- insightscommandbuttoniconprops="[object Object]"
- >
- test-text
- </mock-button>
- </DocumentFragment>
+ <DocumentFragment />
at Object.toMatchSnapshot (src/tests/unit/tests/common/components/controls/insights-command-button.test.tsx:34:43)
at runMicrotasks (<anonymous>)
|
This job failed
Loading