-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiDataGrid][bonus] remove all enzyme in favor of RTL
- Loading branch information
Showing
3 changed files
with
66 additions
and
118 deletions.
There are no files selected for viewing
125 changes: 33 additions & 92 deletions
125
src/components/datagrid/body/header/__snapshots__/data_grid_header_cell.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,58 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiDataGridHeaderCell renders 1`] = ` | ||
<EuiDataGridHeaderCellWrapper | ||
className="euiDataGridHeaderCell--numeric" | ||
headerIsInteractive={false} | ||
id="someColumn" | ||
index={0} | ||
width={50} | ||
<div | ||
class="euiDataGridHeaderCell euiDataGridHeaderCell--numeric" | ||
data-gridcell-column-id="someColumn" | ||
data-gridcell-column-index="0" | ||
data-gridcell-row-index="-1" | ||
data-gridcell-visible-row-index="-1" | ||
data-test-subj="dataGridHeaderCell-someColumn" | ||
role="columnheader" | ||
style="width: 50px;" | ||
tabindex="-1" | ||
> | ||
<EuiDataGridColumnResizer | ||
columnId="someColumn" | ||
columnWidth={50} | ||
setColumnWidth={[MockFunction]} | ||
<div | ||
class="euiDataGridColumnResizer" | ||
data-test-subj="dataGridColumnResizer" | ||
style="margin-right: 0px;" | ||
/> | ||
<EuiPopover | ||
anchorClassName="eui-fullWidth" | ||
anchorPosition="downCenter" | ||
button={ | ||
<div | ||
class="euiPopover eui-fullWidth emotion-euiPopover" | ||
> | ||
<div | ||
class="euiPopover__anchor eui-fullWidth css-16vtueo-render" | ||
> | ||
<button | ||
aria-describedby="euiDataGridCellHeader_generated-id_sorting euiDataGridCellHeader_generated-id_actions" | ||
className="euiDataGridHeaderCell__button" | ||
onClick={[Function]} | ||
class="euiDataGridHeaderCell__button" | ||
data-euigrid-tab-managed="true" | ||
tabindex="-1" | ||
> | ||
<div | ||
className="euiDataGridHeaderCell__content" | ||
class="euiDataGridHeaderCell__content" | ||
title="someColumn" | ||
> | ||
someColumn | ||
</div> | ||
<EuiIcon | ||
className="euiDataGridHeaderCell__icon" | ||
<span | ||
class="euiDataGridHeaderCell__icon" | ||
color="text" | ||
data-euiicon-type="arrowDown" | ||
data-test-subj="dataGridHeaderCellActionButton-someColumn" | ||
size="s" | ||
type="arrowDown" | ||
/> | ||
</button> | ||
} | ||
className="eui-fullWidth" | ||
closePopover={[Function]} | ||
display="inline-block" | ||
hasArrow={true} | ||
isOpen={false} | ||
offset={7} | ||
ownFocus={true} | ||
panelPaddingSize="none" | ||
panelProps={ | ||
Object { | ||
"onKeyDown": [Function], | ||
} | ||
} | ||
panelRef={[Function]} | ||
popoverScreenReaderText={ | ||
<EuiI18n | ||
default="To navigate through the list of column actions, press the Tab or Up and Down arrow keys." | ||
token="euiDataGridHeaderCell.actionsPopoverScreenReaderText" | ||
/> | ||
} | ||
repositionToCrossAxis={true} | ||
> | ||
<EuiListGroup | ||
data-test-subj="dataGridHeaderCellActionGroup-someColumn" | ||
gutterSize="none" | ||
listItems={ | ||
Array [ | ||
Object { | ||
"color": "text", | ||
"iconType": "eyeClosed", | ||
"label": <EuiI18n | ||
default="Hide column" | ||
token="euiColumnActions.hideColumn" | ||
/>, | ||
"onClick": [Function], | ||
"size": "xs", | ||
}, | ||
Object { | ||
"color": "text", | ||
"iconType": "sortLeft", | ||
"isDisabled": false, | ||
"label": <EuiI18n | ||
default="Move left" | ||
token="euiColumnActions.moveLeft" | ||
/>, | ||
"onClick": [Function], | ||
"size": "xs", | ||
}, | ||
Object { | ||
"color": "text", | ||
"iconType": "sortRight", | ||
"isDisabled": true, | ||
"label": <EuiI18n | ||
default="Move right" | ||
token="euiColumnActions.moveRight" | ||
/>, | ||
"onClick": [Function], | ||
"size": "xs", | ||
}, | ||
] | ||
} | ||
/> | ||
</EuiPopover> | ||
</div> | ||
</div> | ||
<p | ||
hidden={true} | ||
hidden="" | ||
id="euiDataGridCellHeader_generated-id_sorting" | ||
/> | ||
<p | ||
hidden={true} | ||
hidden="" | ||
id="euiDataGridCellHeader_generated-id_actions" | ||
> | ||
<EuiI18n | ||
default="Click to view column header actions" | ||
token="euiDataGridHeaderCell.headerActions" | ||
/> | ||
Click to view column header actions | ||
</p> | ||
</EuiDataGridHeaderCellWrapper> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters