Skip to content

[Discover] remove huge fields FTR#271987

Open
drewdaemon wants to merge 4 commits into
elastic:mainfrom
drewdaemon:270754/remove-huge-fields-ftr
Open

[Discover] remove huge fields FTR#271987
drewdaemon wants to merge 4 commits into
elastic:mainfrom
drewdaemon:270754/remove-huge-fields-ftr

Conversation

@drewdaemon
Copy link
Copy Markdown
Contributor

@drewdaemon drewdaemon commented May 29, 2026

Summary

Part of #270754

Removes what was essentially a browser-based field pagination test.

Justification

We already test pagination at the component level. We don't need to test the browser's scroll handler.

it('renders correctly when paginated', async () => {
const user = userEvent.setup();
await mountGroupedList({
listProps: {
...defaultProps,
fieldsExistenceStatus: ExistenceFetchStatus.succeeded,
},
hookParams: {
dataViewId: dataView.id!,
allFields: manyFields,
},
});
expect(screen.getByTestId(DESCRIPTION_ID)).toHaveTextContent(
'25 available fields. 112 unmapped fields. 3 meta fields.'
);
const availableFields = screen.getByTestId('fieldListGroupedAvailableFields');
const unmappedFields = screen.getByTestId('fieldListGroupedUnmappedFields');
const metaFields = screen.getByTestId('fieldListGroupedMetaFields');
expect(within(availableFields).getAllByTestId('testFieldItem')).toHaveLength(25);
expect(within(unmappedFields).queryAllByTestId('testFieldItem')).toHaveLength(0);
expect(within(metaFields).queryAllByTestId('testFieldItem')).toHaveLength(0);
expect(
screen.getByText("Fields that aren't explicitly mapped to a field data type.")
).toBeVisible();
await user.click(screen.getByRole('button', { name: /unmapped fields/i }));
expect(within(availableFields).getAllByTestId('testFieldItem')).toHaveLength(25);
expect(within(unmappedFields).getAllByTestId('testFieldItem')).toHaveLength(50);
expect(within(metaFields).queryAllByTestId('testFieldItem')).toHaveLength(0);
await user.click(screen.getByRole('button', { name: /meta fields/i }));
expect(within(availableFields).getAllByTestId('testFieldItem')).toHaveLength(25);
expect(within(unmappedFields).getAllByTestId('testFieldItem')).toHaveLength(88);
expect(within(metaFields).queryAllByTestId('testFieldItem')).toHaveLength(0);
});

@drewdaemon drewdaemon added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels May 29, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #43 / serverless observability UI - ML and Discover discover/observabilitySolution/context_awareness extension getRowIndicatorProvider should not render log.level row indicators for logs data source without a log.level field

Metrics [docs]

✅ unchanged

@drewdaemon drewdaemon marked this pull request as ready for review May 29, 2026 21:24
@drewdaemon drewdaemon requested a review from a team as a code owner May 29, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants