Skip to content

Commit

Permalink
[8.x] Upgrade EUI to v95.12.0 (#193805) (#194500)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [Upgrade EUI to v95.12.0
(#193805)](#193805)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Cee
Chen","email":"549407+cee-chen@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-30T23:25:47Z","message":"Upgrade
EUI to v95.12.0 (#193805)\n\n`v95.11.0`⏩`v95.12.0-backport.0`\r\n\r\n>
[!note]\r\n> A few fun highlights from this release:\r\n> - Content
within `EuiDataGrid`, `EuiBasicTable`, and\r\n`EuiInMemoryTable`, when
manually selected/highlighted by users, should\r\nnow more cleanly copy
and paste into various spreadsheet apps\r\n> - `EuiProvider` will now
detect the user's system-level dark or light\r\nmode and default to that
if no `colorMode` prop is passed manually\r\n\r\n_[Questions? Please see
our Kibana
upgrade\r\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_\r\n\r\n---\r\n\r\n##
[`v95.12.0`](https://github.com/elastic/eui/releases/v95.12.0)\r\n\r\n-
Enhanced `EuiDataGrid` and `EuiBasic/InMemoryTable` to clean
content\r\nnewlines/tabs when users copy and paste from their tabular
data\r\n([#8019](https://github.com/elastic/eui/pull/8019))\r\n- Updated
`EuiResizableButton` with a new `accountForScrollbars`
prop\r\n([#8021](https://github.com/elastic/eui/pull/8021))\r\n- Updated
`EuiProvider` to inherit from the user's OS/system light/dark\r\nmode
setting if a `colorMode` prop has not been
passed\r\n([#8026](https://github.com/elastic/eui/pull/8026))\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiDatePicker`'s `onClear` button to not appear
when the input\r\nis `disabled`
([#8020](https://github.com/elastic/eui/pull/8020))\r\n- Fixed several
`EuiDataGrid` row height
bugs:\r\n([#8025](https://github.com/elastic/eui/pull/8025))\r\n- Fixed
row heights not recalculating when\r\n`rowHeightOptions.lineHeight`,
`gridStyles.fontSize`, or\r\n`gridStyles.cellPadding` changed\r\n- Fixed
incorrect height calculations for `rowHeightOptions.rowHeights`\r\nwith
`lineCount`s\r\n- Fixed control column content to align better with
multi-line row\r\nheights, as well as custom
line-heights\r\n##\r\n[`v95.12.0-backport.0`](https://github.com/elastic/eui/releases/v95.12.0-backport.0)\r\n\r\n**This
is a backport release only intended for use by Kibana.**\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiProvider`'s system color mode detection
causing errors\r\nduring server-side
rendering\r\n([#8040](https://github.com/elastic/eui/pull/8040))\r\n-
Fixed an `EuiDataGrid` rendering bug that was causing
bouncing\r\nscrollbar issues
([#8041](https://github.com/elastic/eui/pull/8041))","sha":"8a89c8576df104c16ae3abf39b9db766e56d4e3b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","EUI","v9.0.0","v8.16.0","backport:version"],"title":"Upgrade
EUI to
v95.12.0","number":193805,"url":"https://github.com/elastic/kibana/pull/193805","mergeCommit":{"message":"Upgrade
EUI to v95.12.0 (#193805)\n\n`v95.11.0`⏩`v95.12.0-backport.0`\r\n\r\n>
[!note]\r\n> A few fun highlights from this release:\r\n> - Content
within `EuiDataGrid`, `EuiBasicTable`, and\r\n`EuiInMemoryTable`, when
manually selected/highlighted by users, should\r\nnow more cleanly copy
and paste into various spreadsheet apps\r\n> - `EuiProvider` will now
detect the user's system-level dark or light\r\nmode and default to that
if no `colorMode` prop is passed manually\r\n\r\n_[Questions? Please see
our Kibana
upgrade\r\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_\r\n\r\n---\r\n\r\n##
[`v95.12.0`](https://github.com/elastic/eui/releases/v95.12.0)\r\n\r\n-
Enhanced `EuiDataGrid` and `EuiBasic/InMemoryTable` to clean
content\r\nnewlines/tabs when users copy and paste from their tabular
data\r\n([#8019](https://github.com/elastic/eui/pull/8019))\r\n- Updated
`EuiResizableButton` with a new `accountForScrollbars`
prop\r\n([#8021](https://github.com/elastic/eui/pull/8021))\r\n- Updated
`EuiProvider` to inherit from the user's OS/system light/dark\r\nmode
setting if a `colorMode` prop has not been
passed\r\n([#8026](https://github.com/elastic/eui/pull/8026))\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiDatePicker`'s `onClear` button to not appear
when the input\r\nis `disabled`
([#8020](https://github.com/elastic/eui/pull/8020))\r\n- Fixed several
`EuiDataGrid` row height
bugs:\r\n([#8025](https://github.com/elastic/eui/pull/8025))\r\n- Fixed
row heights not recalculating when\r\n`rowHeightOptions.lineHeight`,
`gridStyles.fontSize`, or\r\n`gridStyles.cellPadding` changed\r\n- Fixed
incorrect height calculations for `rowHeightOptions.rowHeights`\r\nwith
`lineCount`s\r\n- Fixed control column content to align better with
multi-line row\r\nheights, as well as custom
line-heights\r\n##\r\n[`v95.12.0-backport.0`](https://github.com/elastic/eui/releases/v95.12.0-backport.0)\r\n\r\n**This
is a backport release only intended for use by Kibana.**\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiProvider`'s system color mode detection
causing errors\r\nduring server-side
rendering\r\n([#8040](https://github.com/elastic/eui/pull/8040))\r\n-
Fixed an `EuiDataGrid` rendering bug that was causing
bouncing\r\nscrollbar issues
([#8041](https://github.com/elastic/eui/pull/8041))","sha":"8a89c8576df104c16ae3abf39b9db766e56d4e3b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193805","number":193805,"mergeCommit":{"message":"Upgrade
EUI to v95.12.0 (#193805)\n\n`v95.11.0`⏩`v95.12.0-backport.0`\r\n\r\n>
[!note]\r\n> A few fun highlights from this release:\r\n> - Content
within `EuiDataGrid`, `EuiBasicTable`, and\r\n`EuiInMemoryTable`, when
manually selected/highlighted by users, should\r\nnow more cleanly copy
and paste into various spreadsheet apps\r\n> - `EuiProvider` will now
detect the user's system-level dark or light\r\nmode and default to that
if no `colorMode` prop is passed manually\r\n\r\n_[Questions? Please see
our Kibana
upgrade\r\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_\r\n\r\n---\r\n\r\n##
[`v95.12.0`](https://github.com/elastic/eui/releases/v95.12.0)\r\n\r\n-
Enhanced `EuiDataGrid` and `EuiBasic/InMemoryTable` to clean
content\r\nnewlines/tabs when users copy and paste from their tabular
data\r\n([#8019](https://github.com/elastic/eui/pull/8019))\r\n- Updated
`EuiResizableButton` with a new `accountForScrollbars`
prop\r\n([#8021](https://github.com/elastic/eui/pull/8021))\r\n- Updated
`EuiProvider` to inherit from the user's OS/system light/dark\r\nmode
setting if a `colorMode` prop has not been
passed\r\n([#8026](https://github.com/elastic/eui/pull/8026))\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiDatePicker`'s `onClear` button to not appear
when the input\r\nis `disabled`
([#8020](https://github.com/elastic/eui/pull/8020))\r\n- Fixed several
`EuiDataGrid` row height
bugs:\r\n([#8025](https://github.com/elastic/eui/pull/8025))\r\n- Fixed
row heights not recalculating when\r\n`rowHeightOptions.lineHeight`,
`gridStyles.fontSize`, or\r\n`gridStyles.cellPadding` changed\r\n- Fixed
incorrect height calculations for `rowHeightOptions.rowHeights`\r\nwith
`lineCount`s\r\n- Fixed control column content to align better with
multi-line row\r\nheights, as well as custom
line-heights\r\n##\r\n[`v95.12.0-backport.0`](https://github.com/elastic/eui/releases/v95.12.0-backport.0)\r\n\r\n**This
is a backport release only intended for use by Kibana.**\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiProvider`'s system color mode detection
causing errors\r\nduring server-side
rendering\r\n([#8040](https://github.com/elastic/eui/pull/8040))\r\n-
Fixed an `EuiDataGrid` rendering bug that was causing
bouncing\r\nscrollbar issues
([#8041](https://github.com/elastic/eui/pull/8041))","sha":"8a89c8576df104c16ae3abf39b9db766e56d4e3b"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
  • Loading branch information
kibanamachine and cee-chen authored Oct 1, 2024
1 parent 6aa7c23 commit 20ee61b
Show file tree
Hide file tree
Showing 22 changed files with 126 additions and 169 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"@elastic/ecs": "^8.11.1",
"@elastic/elasticsearch": "^8.15.0",
"@elastic/ems-client": "8.5.3",
"@elastic/eui": "95.11.0",
"@elastic/eui": "95.12.0-backport.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down
20 changes: 7 additions & 13 deletions packages/kbn-test/src/jest/setup/polyfills.jsdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,16 @@ if (!Object.hasOwn(global, 'Worker')) {
if (!Object.hasOwn(global, 'matchMedia')) {
Object.defineProperty(global, 'matchMedia', {
writable: true,
// eslint-disable-next-line no-undef
value: jest.fn().mockImplementation((query) => ({
value: (query) => ({
matches: false,
media: query,
onchange: null,
// eslint-disable-next-line no-undef
addListener: jest.fn(), // deprecated
// eslint-disable-next-line no-undef
removeListener: jest.fn(), // deprecated
// eslint-disable-next-line no-undef
addEventListener: jest.fn(),
// eslint-disable-next-line no-undef
removeEventListener: jest.fn(),
// eslint-disable-next-line no-undef
dispatchEvent: jest.fn(),
})),
addListener: () => {},
removeListener: () => {},
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => {},
}),
});
}
}
1 change: 0 additions & 1 deletion packages/kbn-unified-data-table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export { popularizeField } from './src/utils/popularize_field';

export { useColumns, type UseColumnsProps } from './src/hooks/use_data_grid_columns';
export { OPEN_DETAILS, SELECT_ROW } from './src/components/data_table_columns'; // TODO: deprecate?
export { DataTableRowControl } from './src/components/data_table_row_control';

export type {
UnifiedDataTableRenderCustomToolbar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
EuiToolTip,
} from '@elastic/eui';
import { RowControlColumn, RowControlProps } from '@kbn/discover-utils';
import { DataTableRowControl, Size } from '../../data_table_row_control';
import { DEFAULT_CONTROL_COLUMN_WIDTH } from '../../../constants';
import { useControlColumn } from '../../../hooks/use_control_column';

Expand All @@ -40,23 +39,25 @@ export const RowControlCell = ({
tooltipContent,
}) => {
return (
<DataTableRowControl size={Size.normal}>
<EuiToolTip content={tooltipContent ?? label} delay="long">
<EuiButtonIcon
data-test-subj={dataTestSubj ?? `unifiedDataTable_rowControl_${props.columnId}`}
disabled={disabled}
iconSize="s"
iconType={iconType}
color={color ?? 'text'}
aria-label={label}
onClick={() => {
if (record) {
onClick?.({ record, rowIndex });
}
}}
/>
</EuiToolTip>
</DataTableRowControl>
<EuiToolTip
content={tooltipContent ?? label}
delay="long"
anchorClassName="unifiedDataTable__rowControl"
>
<EuiButtonIcon
data-test-subj={dataTestSubj ?? `unifiedDataTable_rowControl_${props.columnId}`}
disabled={disabled}
iconSize="s"
iconType={iconType}
color={color ?? 'text'}
aria-label={label}
onClick={() => {
if (record) {
onClick?.({ record, rowIndex });
}
}}
/>
</EuiToolTip>
);
},
[props.columnId, record, rowIndex]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ import {
EuiToolTip,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { css } from '@emotion/react';
import { RowControlColumn, RowControlProps } from '@kbn/discover-utils';
import { DataTableRowControl, Size } from '../../data_table_row_control';
import { DEFAULT_CONTROL_COLUMN_WIDTH } from '../../../constants';
import { useControlColumn } from '../../../hooks/use_control_column';

Expand Down Expand Up @@ -80,26 +78,20 @@ export const RowMenuControlCell = ({
return (
<EuiPopover
id={`rowMenuActionsPopover_${props.rowIndex}`}
className="unifiedDataTable__rowControl"
button={
<DataTableRowControl size={Size.normal}>
<EuiToolTip content={buttonLabel} delay="long">
<EuiButtonIcon
data-test-subj={`unifiedDataTable_${props.columnId}`}
iconSize="s"
iconType="boxesVertical"
color="text"
aria-label={buttonLabel}
css={css`
.euiDataGridRowCell__content--defaultHeight & {
margin-top: 2px; // to align with other controls
}
`}
onClick={() => {
setIsMoreActionsPopoverOpen(!isMoreActionsPopoverOpen);
}}
/>
</EuiToolTip>
</DataTableRowControl>
<EuiToolTip content={buttonLabel} delay="long">
<EuiButtonIcon
data-test-subj={`unifiedDataTable_${props.columnId}`}
iconSize="s"
iconType="boxesVertical"
color="text"
aria-label={buttonLabel}
onClick={() => {
setIsMoreActionsPopoverOpen(!isMoreActionsPopoverOpen);
}}
/>
</EuiToolTip>
}
isOpen={isMoreActionsPopoverOpen}
closePopover={() => setIsMoreActionsPopoverOpen(false)}
Expand Down
17 changes: 9 additions & 8 deletions packages/kbn-unified-data-table/src/components/data_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,17 @@

.unifiedDataTable__rowControl {
// fine-tuning the vertical alignment with the text for any row height setting
margin-top: -$euiSizeXS;
.euiDataGridRowCell__content--defaultHeight & { // "Single line" row height setting
margin-top: 0;
margin-top: -1px;

// Compact density - 'auto & custom' row height
.euiDataGrid--fontSizeSmall .euiDataGridRowCell__content:not(.euiDataGridRowCell__content--defaultHeight) & {
margin-top: -2.5px;
}

&--size-normal {
display: inline-block;
width: $euiSizeL;
height: $euiSizeL;
overflow: hidden;
// Compact density - 'single' row height
.euiDataGrid--fontSizeSmall .euiDataGridRowCell__content--defaultHeight & {
align-self: flex-start;
margin-top: -3px;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,22 @@ export const SelectButton = (props: EuiDataGridCellValueElementProps) => {
}

return (
<EuiFlexGroup
responsive={false}
direction="column"
justifyContent="center"
className="unifiedDataTable__rowControl"
<EuiCheckbox
id={record.id}
aria-label={toggleDocumentSelectionLabel}
checked={isDocSelected(record.id)}
data-test-subj={`dscGridSelectDoc-${record.id}`}
onChange={(event) => {
if ((event.nativeEvent as MouseEvent)?.shiftKey) {
toggleMultipleDocsSelection(record.id);
} else {
toggleDocSelection(record.id);
}
}}
css={css`
padding-block: ${euiTheme.size.xs}; // to have the same height as "openDetails" control
padding-left: ${euiTheme.size.xs}; // space between controls
margin-left: ${euiTheme.size.xs}; /* fine tune horizontal alignment */
`}
>
<EuiFlexItem grow={false}>
<EuiCheckbox
id={record.id}
aria-label={toggleDocumentSelectionLabel}
checked={isDocSelected(record.id)}
data-test-subj={`dscGridSelectDoc-${record.id}`}
onChange={(event) => {
if ((event.nativeEvent as MouseEvent)?.shiftKey) {
toggleMultipleDocsSelection(record.id);
} else {
toggleDocSelection(record.id);
}
}}
/>
</EuiFlexItem>
</EuiFlexGroup>
/>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import React, { useContext, useEffect, useRef, useState } from 'react';
import { EuiButtonIcon, EuiDataGridCellValueElementProps, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { UnifiedDataTableContext } from '../table_context';
import { DataTableRowControl, Size } from './data_table_row_control';
import { useControlColumn } from '../hooks/use_control_column';

/**
Expand Down Expand Up @@ -49,25 +48,28 @@ export const ExpandButton = (props: EuiDataGridCellValueElementProps) => {
}

return (
<DataTableRowControl size={Size.normal}>
<EuiToolTip content={buttonLabel} delay="long" ref={toolTipRef}>
<EuiButtonIcon
id={rowIndex === 0 ? tourStep : undefined}
size="xs"
iconSize="s"
aria-label={buttonLabel}
data-test-subj={testSubj}
onClick={() => {
const nextHit = isCurrentRowExpanded ? undefined : record;
toolTipRef.current?.hideToolTip();
setPressed(Boolean(nextHit));
setExpanded?.(nextHit);
}}
color={isCurrentRowExpanded ? 'primary' : 'text'}
iconType={isCurrentRowExpanded ? 'minimize' : 'expand'}
isSelected={isCurrentRowExpanded}
/>
</EuiToolTip>
</DataTableRowControl>
<EuiToolTip
content={buttonLabel}
delay="long"
ref={toolTipRef}
anchorClassName="unifiedDataTable__rowControl"
>
<EuiButtonIcon
id={rowIndex === 0 ? tourStep : undefined}
size="xs"
iconSize="s"
aria-label={buttonLabel}
data-test-subj={testSubj}
onClick={() => {
const nextHit = isCurrentRowExpanded ? undefined : record;
toolTipRef.current?.hideToolTip();
setPressed(Boolean(nextHit));
setExpanded?.(nextHit);
}}
color={isCurrentRowExpanded ? 'primary' : 'text'}
iconType={isCurrentRowExpanded ? 'minimize' : 'expand'}
isSelected={isCurrentRowExpanded}
/>
</EuiToolTip>
);
};

This file was deleted.

2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.5.3': ['Elastic License 2.0'],
'@elastic/eui@95.11.0': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'],
'@elastic/eui@95.12.0-backport.0': ['Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary
'@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/discover/esql/_esql_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const cell = await dataGrid.getCellElementExcludingControlColumns(0, 1);
expect(await cell.getVisibleText()).to.be(' - ');
expect(await dataGrid.getHeaders()).to.eql([
"Select columnPress the Enter key to interact with this cell's contents.", // contains screen reader help text
'Select column',
'Control column',
'Access to degraded docs',
'Access to available stacktraces',
Expand Down
29 changes: 20 additions & 9 deletions test/functional/services/data_grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { chunk } from 'lodash';
import { Key } from 'selenium-webdriver';
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
import { WebElementWrapper, CustomCheerioStatic } from '@kbn/ftr-common-functional-ui-services';
import { FtrService } from '../ftr_provider_context';

export interface TabbedGridData {
Expand All @@ -34,12 +34,10 @@ export class DataGridService extends FtrService {
const table = await this.find.byCssSelector('.euiDataGrid');
const $ = await table.parseDomContent();

const columns = $('.euiDataGridHeaderCell')
.toArray()
.map((cell) => $(cell).text());
const columns = this.getHeaderText($);
const cells = $.findTestSubjects('dataGridRowCell')
.toArray()
.map((cell) => $(cell).text());
.map((cell) => $(cell).find('.euiDataGridRowCell__content').text());

const rows = chunk(cells, columns.length);

Expand Down Expand Up @@ -76,12 +74,25 @@ export class DataGridService extends FtrService {
/**
* Returns an array of data grid headers names
*/
public async getHeaders() {
const header = await this.testSubjects.find('euiDataGridBody > dataGridHeader');
const $ = await header.parseDomContent();
public getHeaderText(parsedDomContent: CustomCheerioStatic) {
const $ = parsedDomContent;
return $('.euiDataGridHeaderCell')
.toArray()
.map((cell) => $(cell).text());
.map((cell) => {
const content = $(cell).find('.euiDataGridHeaderCell__content');
if (content.length) {
return content.text();
} else {
// Control columns will need hidden text manually stripped
$(cell).find('[hidden], [data-tabular-copy-marker]').remove();
return $(cell).text();
}
});
}

public async getHeaders() {
const header = await this.testSubjects.find('euiDataGridBody > dataGridHeader');
return this.getHeaderText(await header.parseDomContent());
}

public getHeaderElement(field: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,9 @@ describe('Packs - Create and Edit', { tags: ['@ess', '@serverless'] }, () => {
cy.getBySel('docsLoading').should('exist');
cy.getBySel('docsLoading').should('not.exist');

return cy.get('tbody .euiTableRow > td:nth-child(5)').invoke('text');
return cy
.get('tbody .euiTableRow > td:nth-child(5) > .euiTableCellContent')
.invoke('text');
},
(response) => response !== '-',
{
Expand Down
Loading

0 comments on commit 20ee61b

Please sign in to comment.