Skip to content

Commit

Permalink
Updated unit tests and snapshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
1Copenut committed Apr 17, 2024
1 parent c0473b4 commit 03b4edb
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 41 deletions.
23 changes: 0 additions & 23 deletions src/components/accordion/__snapshots__/accordion.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ exports[`EuiAccordion behavior closes when clicked twice 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -97,7 +96,6 @@ exports[`EuiAccordion behavior does not open when isDisabled 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -150,7 +148,6 @@ exports[`EuiAccordion behavior opens when clicked once 1`] = `
id="22"
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -203,7 +200,6 @@ exports[`EuiAccordion behavior opens when div is clicked if element is a div 1`]
id="24"
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -259,7 +255,6 @@ exports[`EuiAccordion is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -311,7 +306,6 @@ exports[`EuiAccordion isDisabled is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -346,7 +340,6 @@ exports[`EuiAccordion props arrowDisplay none is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -396,7 +389,6 @@ exports[`EuiAccordion props arrowDisplay right is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -448,7 +440,6 @@ exports[`EuiAccordion props arrowProps is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -502,7 +493,6 @@ exports[`EuiAccordion props buttonContent is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -552,7 +542,6 @@ exports[`EuiAccordion props buttonContentClassName is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -600,7 +589,6 @@ exports[`EuiAccordion props buttonElement is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -652,7 +640,6 @@ exports[`EuiAccordion props buttonProps is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -703,7 +690,6 @@ exports[`EuiAccordion props buttonProps paddingSize l 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -754,7 +740,6 @@ exports[`EuiAccordion props buttonProps paddingSize m 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -805,7 +790,6 @@ exports[`EuiAccordion props buttonProps paddingSize s 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -853,7 +837,6 @@ exports[`EuiAccordion props element is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -910,7 +893,6 @@ exports[`EuiAccordion props extraAction is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -960,7 +942,6 @@ exports[`EuiAccordion props forceState closed is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -1013,7 +994,6 @@ exports[`EuiAccordion props forceState open is rendered 1`] = `
id="17"
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -1066,7 +1046,6 @@ exports[`EuiAccordion props initialIsOpen is rendered 1`] = `
id="12"
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -1129,7 +1108,6 @@ exports[`EuiAccordion props isLoading is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children euiAccordion__children-isLoading emotion-euiAccordion__children-isLoading"
Expand Down Expand Up @@ -1188,7 +1166,6 @@ exports[`EuiAccordion props isLoadingMessage is rendered 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children euiAccordion__children-isLoading emotion-euiAccordion__children-isLoading"
Expand Down
13 changes: 0 additions & 13 deletions src/components/accordion/accordion.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,5 @@ describe('EuiAccordion', () => {
expect(onToggleHandler).toBeCalled();
expect(onToggleHandler).toBeCalledWith(false);
});

it('moves focus to the content when expanded', () => {
const component = mount(<EuiAccordion id={getId()} />);
const childWrapper = component.find('div[role="group"]').getDOMNode();

expect(childWrapper).not.toBeFalsy();
expect(childWrapper).not.toBe(document.activeElement);

// click the button
component.find('button').at(0).simulate('click');

expect(childWrapper).toBe(document.activeElement);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ exports[`EuiCollapsibleNavGroup when isCollapsible is true accepts accordion pro
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -321,7 +320,6 @@ exports[`EuiCollapsibleNavGroup when isCollapsible is true will render an accord
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ exports[`EuiCollapsibleNavAccordion renders as a sub item 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down Expand Up @@ -119,7 +118,6 @@ exports[`EuiCollapsibleNavAccordion renders as a top level item 1`] = `
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ exports[`EuiCollapsibleNavItem renders a top level accordion if items exist 1`]
inert=""
role="group"
style="block-size: 0;"
tabindex="-1"
>
<div
class="euiAccordion__children emotion-euiAccordion__children"
Expand Down

0 comments on commit 03b4edb

Please sign in to comment.