Migrate AccessibleButton-test to RTL (#9833)
This commit is contained in:
parent
2b7d106481
commit
d2763c329d
2 changed files with 53 additions and 111 deletions
|
@ -1,62 +1,37 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<AccessibleButton /> renders a button element 1`] = `
|
||||
<AccessibleButton
|
||||
element="button"
|
||||
onClick={[MockFunction]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
<DocumentFragment>
|
||||
<button
|
||||
className="mx_AccessibleButton"
|
||||
onClick={[MockFunction]}
|
||||
onKeyDown={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
class="mx_AccessibleButton"
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
tabindex="0"
|
||||
>
|
||||
i am a button
|
||||
</button>
|
||||
</AccessibleButton>
|
||||
</DocumentFragment>
|
||||
`;
|
||||
|
||||
exports[`<AccessibleButton /> renders div with role button by default 1`] = `
|
||||
<AccessibleButton
|
||||
element="div"
|
||||
onClick={[MockFunction]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
<DocumentFragment>
|
||||
<div
|
||||
className="mx_AccessibleButton"
|
||||
onClick={[MockFunction]}
|
||||
onKeyDown={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
class="mx_AccessibleButton"
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
tabindex="0"
|
||||
>
|
||||
i am a button
|
||||
</div>
|
||||
</AccessibleButton>
|
||||
</DocumentFragment>
|
||||
`;
|
||||
|
||||
exports[`<AccessibleButton /> renders with correct classes when button has kind 1`] = `
|
||||
<AccessibleButton
|
||||
element="div"
|
||||
kind="primary"
|
||||
onClick={[MockFunction]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
<DocumentFragment>
|
||||
<div
|
||||
className="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
|
||||
onClick={[MockFunction]}
|
||||
onKeyDown={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
tabindex="0"
|
||||
>
|
||||
i am a button
|
||||
</div>
|
||||
</AccessibleButton>
|
||||
</DocumentFragment>
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue