Skip to content

Commit

Permalink
Update downstream (mostly datagrid) tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Oct 27, 2023
1 parent 2a43949 commit 7722854
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ exports[`useDataGridColumnSorting columnSorting [React 16] renders a toolbar but
<div
class="euiButtonGroup__buttons emotion-euiButtonGroup__buttons-fullWidth-compressed"
>
<label
<button
aria-pressed="true"
class="euiButtonGroupButton euiButtonGroupButton-isSelected emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-fill-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-asc"
title="Low-High"
Expand All @@ -165,19 +166,12 @@ exports[`useDataGridColumnSorting columnSorting [React 16] renders a toolbar but
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="Low-High"
>
<input
checked=""
class="euiScreenReaderOnly"
data-test-subj="columnAAsc"
name="columnA"
type="radio"
value="asc"
/>
Low-High
</span>
</span>
</label>
<label
</button>
<button
aria-pressed="false"
class="euiButtonGroupButton emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-empty-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-desc"
title="High-Low"
Expand All @@ -190,17 +184,10 @@ exports[`useDataGridColumnSorting columnSorting [React 16] renders a toolbar but
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="High-Low"
>
<input
class="euiScreenReaderOnly"
data-test-subj="columnADesc"
name="columnA"
type="radio"
value="desc"
/>
High-Low
</span>
</span>
</label>
</button>
</div>
</fieldset>
</div>
Expand Down Expand Up @@ -442,7 +429,8 @@ exports[`useDataGridColumnSorting columnSorting [React 17] renders a toolbar but
<div
class="euiButtonGroup__buttons emotion-euiButtonGroup__buttons-fullWidth-compressed"
>
<label
<button
aria-pressed="true"
class="euiButtonGroupButton euiButtonGroupButton-isSelected emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-fill-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-asc"
title="Low-High"
Expand All @@ -455,19 +443,12 @@ exports[`useDataGridColumnSorting columnSorting [React 17] renders a toolbar but
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="Low-High"
>
<input
checked=""
class="euiScreenReaderOnly"
data-test-subj="columnAAsc"
name="columnA"
type="radio"
value="asc"
/>
Low-High
</span>
</span>
</label>
<label
</button>
<button
aria-pressed="false"
class="euiButtonGroupButton emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-empty-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-desc"
title="High-Low"
Expand All @@ -480,17 +461,10 @@ exports[`useDataGridColumnSorting columnSorting [React 17] renders a toolbar but
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="High-Low"
>
<input
class="euiScreenReaderOnly"
data-test-subj="columnADesc"
name="columnA"
type="radio"
value="desc"
/>
High-Low
</span>
</span>
</label>
</button>
</div>
</fieldset>
</div>
Expand Down Expand Up @@ -732,7 +706,8 @@ exports[`useDataGridColumnSorting columnSorting [React 18] renders a toolbar but
<div
class="euiButtonGroup__buttons emotion-euiButtonGroup__buttons-fullWidth-compressed"
>
<label
<button
aria-pressed="true"
class="euiButtonGroupButton euiButtonGroupButton-isSelected emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-fill-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-asc"
title="Low-High"
Expand All @@ -745,19 +720,12 @@ exports[`useDataGridColumnSorting columnSorting [React 18] renders a toolbar but
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="Low-High"
>
<input
checked=""
class="euiScreenReaderOnly"
data-test-subj="columnAAsc"
name="columnA"
type="radio"
value="asc"
/>
Low-High
</span>
</span>
</label>
<label
</button>
<button
aria-pressed="false"
class="euiButtonGroupButton emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-empty-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-desc"
title="High-Low"
Expand All @@ -770,17 +738,10 @@ exports[`useDataGridColumnSorting columnSorting [React 18] renders a toolbar but
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="High-Low"
>
<input
class="euiScreenReaderOnly"
data-test-subj="columnADesc"
name="columnA"
type="radio"
value="desc"
/>
High-Low
</span>
</span>
</label>
</button>
</div>
</fieldset>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ exports[`EuiDataGridColumnSortingDraggable [React 16] renders an EuiDraggable co
<div
class="euiButtonGroup__buttons emotion-euiButtonGroup__buttons-fullWidth-compressed"
>
<label
<button
aria-pressed="true"
class="euiButtonGroupButton euiButtonGroupButton-isSelected emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-fill-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-asc"
title="Low-High"
Expand All @@ -100,19 +101,12 @@ exports[`EuiDataGridColumnSortingDraggable [React 16] renders an EuiDraggable co
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="Low-High"
>
<input
checked=""
class="euiScreenReaderOnly"
data-test-subj="columnAAsc"
name="columnA"
type="radio"
value="asc"
/>
Low-High
</span>
</span>
</label>
<label
</button>
<button
aria-pressed="false"
class="euiButtonGroupButton emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-empty-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-desc"
title="High-Low"
Expand All @@ -125,17 +119,10 @@ exports[`EuiDataGridColumnSortingDraggable [React 16] renders an EuiDraggable co
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="High-Low"
>
<input
class="euiScreenReaderOnly"
data-test-subj="columnADesc"
name="columnA"
type="radio"
value="desc"
/>
High-Low
</span>
</span>
</label>
</button>
</div>
</fieldset>
</div>
Expand Down Expand Up @@ -246,7 +233,8 @@ exports[`EuiDataGridColumnSortingDraggable [React 17] renders an EuiDraggable co
<div
class="euiButtonGroup__buttons emotion-euiButtonGroup__buttons-fullWidth-compressed"
>
<label
<button
aria-pressed="true"
class="euiButtonGroupButton euiButtonGroupButton-isSelected emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-fill-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-asc"
title="Low-High"
Expand All @@ -259,19 +247,12 @@ exports[`EuiDataGridColumnSortingDraggable [React 17] renders an EuiDraggable co
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="Low-High"
>
<input
checked=""
class="euiScreenReaderOnly"
data-test-subj="columnAAsc"
name="columnA"
type="radio"
value="asc"
/>
Low-High
</span>
</span>
</label>
<label
</button>
<button
aria-pressed="false"
class="euiButtonGroupButton emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-empty-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-desc"
title="High-Low"
Expand All @@ -284,17 +265,10 @@ exports[`EuiDataGridColumnSortingDraggable [React 17] renders an EuiDraggable co
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="High-Low"
>
<input
class="euiScreenReaderOnly"
data-test-subj="columnADesc"
name="columnA"
type="radio"
value="desc"
/>
High-Low
</span>
</span>
</label>
</button>
</div>
</fieldset>
</div>
Expand Down Expand Up @@ -405,7 +379,8 @@ exports[`EuiDataGridColumnSortingDraggable [React 18] renders an EuiDraggable co
<div
class="euiButtonGroup__buttons emotion-euiButtonGroup__buttons-fullWidth-compressed"
>
<label
<button
aria-pressed="true"
class="euiButtonGroupButton euiButtonGroupButton-isSelected emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-fill-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-asc"
title="Low-High"
Expand All @@ -418,19 +393,12 @@ exports[`EuiDataGridColumnSortingDraggable [React 18] renders an EuiDraggable co
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="Low-High"
>
<input
checked=""
class="euiScreenReaderOnly"
data-test-subj="columnAAsc"
name="columnA"
type="radio"
value="asc"
/>
Low-High
</span>
</span>
</label>
<label
</button>
<button
aria-pressed="false"
class="euiButtonGroupButton emotion-euiButtonDisplay-s-defaultMinWidth-euiButtonGroupButton-compressed-empty-text"
data-test-subj="euiDataGridColumnSorting-sortColumn-columnA-desc"
title="High-Low"
Expand All @@ -443,17 +411,10 @@ exports[`EuiDataGridColumnSortingDraggable [React 18] renders an EuiDraggable co
class="eui-textTruncate emotion-euiButtonGroupButton__text"
data-text="High-Low"
>
<input
class="euiScreenReaderOnly"
data-test-subj="columnADesc"
name="columnA"
type="radio"
value="desc"
/>
High-Low
</span>
</span>
</label>
</button>
</div>
</fieldset>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ describe('EuiDataGridColumnSortingDraggable', () => {
</EuiDragDropContext>
);

fireEvent.click(getByTestSubject('columnADesc'));
fireEvent.click(
getByTestSubject('euiDataGridColumnSorting-sortColumn-columnA-desc')
);

expect(onSort).toHaveBeenCalledWith([{ id: 'columnA', direction: 'desc' }]);
});
Expand Down
Loading

0 comments on commit 7722854

Please sign in to comment.