Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EUI to v95.10.1 #192026

Merged
merged 22 commits into from
Sep 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a8bc292
Upgrade EUI to v95.10.0
cee-chen Sep 3, 2024
5f32b61
i18n updates
cee-chen Sep 3, 2024
748841f
Fix failing kbn-unified-data-table tests
cee-chen Sep 3, 2024
c0be188
Fix several test console errors/warnings
cee-chen Sep 3, 2024
567e25a
Fix other Jest tests toggling column actions to use data-test-subj in…
cee-chen Sep 3, 2024
a3cdd75
[FTR] Fix tests to account for DOM changes
cee-chen Sep 3, 2024
16ab7e2
[FTR] Fix EuiDataGrid service to account for interactive headers/acti…
cee-chen Sep 3, 2024
6c4941f
[FTR] Fix failing Observability tests to use dataGrid service that ac…
cee-chen Sep 3, 2024
f8d5c8f
[FTR] Fix failing tests to with new dataGrid service that allows clic…
cee-chen Sep 3, 2024
95ac4da
[FTR]: update getHeaderFields selector
mgadewoll Sep 4, 2024
9778711
[FTR]: update lense page changeTableSortingBy hover position to ensur…
mgadewoll Sep 4, 2024
b2f287f
[FTR]: update DataGrid service selectors
mgadewoll Sep 4, 2024
440c5df
chore: cleanup unsed var
mgadewoll Sep 4, 2024
4fc8437
[FTR]: revert table reference in DataGrid service getHeaderFields
mgadewoll Sep 4, 2024
5d9970e
[FTR]: update test order
mgadewoll Sep 4, 2024
bb1a9e0
Patch v95.10.1
cee-chen Sep 4, 2024
f81a10b
Merge remote-tracking branch 'upstream/main' into eui/v95.10.0
cee-chen Sep 4, 2024
8c8ed9a
Simplify test selector
cee-chen Sep 4, 2024
c31a4b1
Merge branch 'main' into eui/v95.10.0
cee-chen Sep 6, 2024
be86345
Merge branch 'main' into eui/v95.10.0
cee-chen Sep 9, 2024
b588c3e
Merge remote-tracking branch 'upstream/main' into eui/v95.10.0
cee-chen Sep 10, 2024
68bfbc2
fix type failure
cee-chen Sep 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix failing kbn-unified-data-table tests
  • Loading branch information
cee-chen committed Sep 3, 2024
commit 748841fb7490b63104f67354c85f18a8637efb65
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,15 @@ describe('UnifiedDataTable', () => {
it('should render the edit field button if onFieldEdited is provided', async () => {
renderDataTable({ columns: ['message'], onFieldEdited: jest.fn() });
expect(screen.queryByTestId('dataGridHeaderCellActionGroup-message')).not.toBeInTheDocument();
userEvent.click(screen.getByRole('button', { name: 'message' }));
userEvent.click(screen.getByTestId('dataGridHeaderCellActionButton-message'));
expect(screen.getByTestId('dataGridHeaderCellActionGroup-message')).toBeInTheDocument();
expect(screen.getByTestId('gridEditFieldButton')).toBeInTheDocument();
});

it('should not render the edit field button if onFieldEdited is not provided', async () => {
renderDataTable({ columns: ['message'] });
expect(screen.queryByTestId('dataGridHeaderCellActionGroup-message')).not.toBeInTheDocument();
userEvent.click(screen.getByRole('button', { name: 'message' }));
userEvent.click(screen.getByTestId('dataGridHeaderCellActionButton-message'));
expect(screen.getByTestId('dataGridHeaderCellActionGroup-message')).toBeInTheDocument();
expect(screen.queryByTestId('gridEditFieldButton')).not.toBeInTheDocument();
});
Expand Down Expand Up @@ -957,6 +957,8 @@ describe('UnifiedDataTable', () => {
const EUI_DEFAULT_COLUMN_WIDTH = '100px';
const getColumnHeader = (name: string) => screen.getByRole('columnheader', { name });
const queryColumnHeader = (name: string) => screen.queryByRole('columnheader', { name });
const getColumnActions = (name: string) =>
screen.getByTestId(`dataGridHeaderCellActionButton-${name}`);
const getButton = (name: string) => screen.getByRole('button', { name });
const queryButton = (name: string) => screen.queryByRole('button', { name });

Expand All @@ -973,7 +975,7 @@ describe('UnifiedDataTable', () => {
expect(getColumnHeader('message')).toHaveStyle({ width: EUI_DEFAULT_COLUMN_WIDTH });
expect(getColumnHeader('extension')).toHaveStyle({ width: '50px' });
expect(getColumnHeader('bytes')).toHaveStyle({ width: '50px' });
userEvent.click(getButton('message'));
userEvent.click(getColumnActions('message'));
userEvent.click(getButton('Remove column'), undefined, { skipPointerEventsCheck: true });
expect(queryColumnHeader('message')).not.toBeInTheDocument();
expect(getColumnHeader('extension')).toHaveStyle({ width: '50px' });
Expand All @@ -992,7 +994,7 @@ describe('UnifiedDataTable', () => {
expect(getColumnHeader('message')).toHaveStyle({ width: EUI_DEFAULT_COLUMN_WIDTH });
expect(getColumnHeader('extension')).toHaveStyle({ width: EUI_DEFAULT_COLUMN_WIDTH });
expect(getColumnHeader('bytes')).toHaveStyle({ width: '50px' });
userEvent.click(getButton('message'));
userEvent.click(getColumnActions('message'));
userEvent.click(getButton('Remove column'), undefined, { skipPointerEventsCheck: true });
expect(queryColumnHeader('message')).not.toBeInTheDocument();
expect(getColumnHeader('extension')).toHaveStyle({ width: EUI_DEFAULT_COLUMN_WIDTH });
Expand All @@ -1010,14 +1012,14 @@ describe('UnifiedDataTable', () => {
},
});
expect(getColumnHeader('@timestamp')).toHaveStyle({ width: '50px' });
userEvent.click(getButton('@timestamp'));
userEvent.click(getColumnActions('@timestamp'));
userEvent.click(getButton('Reset width'), undefined, { skipPointerEventsCheck: true });
expect(getColumnHeader('@timestamp')).toHaveStyle({ width: `${defaultTimeColumnWidth}px` });
expect(getColumnHeader('message')).toHaveStyle({ width: EUI_DEFAULT_COLUMN_WIDTH });
userEvent.click(getButton('message'));
userEvent.click(getColumnActions('message'));
expect(queryButton('Reset width')).not.toBeInTheDocument();
expect(getColumnHeader('extension')).toHaveStyle({ width: '50px' });
userEvent.click(getButton('extension'));
userEvent.click(getColumnActions('extension'));
userEvent.click(getButton('Reset width'), undefined, { skipPointerEventsCheck: true });
expect(getColumnHeader('extension')).toHaveStyle({ width: EUI_DEFAULT_COLUMN_WIDTH });
});
Expand Down