[8.16] [Lens] fix flaky long running test (#196725) (#196800)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Lens] fix flaky long running test
(#196725)](https://github.com/elastic/kibana/pull/196725)

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

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

<!--BACKPORT [{"author":{"name":"Marta
Bondyra","email":"4283304+mbondyra@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-18T07:42:11Z","message":"[Lens]
fix flaky long running test (#196725)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/192476\r\nDue the the fact type
function is quite slow but irreplaceable here +\r\nthe DOM tree we're
rendering here is very big, I think the best option\r\nis to up the
timeout limit. On average this test is around 1s long\r\nthough. (We're
setting the limit to
10s)","sha":"ce41bf1fafca416826f1864c3bf8dc0ffb02afc5","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:prev-major"],"title":"[Lens]
fix flaky long running
test","number":196725,"url":"https://github.com/elastic/kibana/pull/196725","mergeCommit":{"message":"[Lens]
fix flaky long running test (#196725)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/192476\r\nDue the the fact type
function is quite slow but irreplaceable here +\r\nthe DOM tree we're
rendering here is very big, I think the best option\r\nis to up the
timeout limit. On average this test is around 1s long\r\nthough. (We're
setting the limit to
10s)","sha":"ce41bf1fafca416826f1864c3bf8dc0ffb02afc5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196725","number":196725,"mergeCommit":{"message":"[Lens]
fix flaky long running test (#196725)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/192476\r\nDue the the fact type
function is quite slow but irreplaceable here +\r\nthe DOM tree we're
rendering here is very big, I think the best option\r\nis to up the
timeout limit. On average this test is around 1s long\r\nthough. (We're
setting the limit to
10s)","sha":"ce41bf1fafca416826f1864c3bf8dc0ffb02afc5"}}]}] BACKPORT-->

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2024-10-18 20:18:15 +11:00 committed by GitHub
parent c899e7d667
commit b98c766c3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -373,7 +373,7 @@ describe('FormBasedDimensionEditor', () => {
// // press arrow up to go back to the beginning
await userEvent.type(comboBoxInput, '{ArrowUp}{ArrowUp}');
expect(getVisibleFieldSelectOptions()).toEqual(allOptions.slice(8));
});
}, 10000); // this test can be long running due to a big tree we're rendering and userEvent.type function that is slow
it('should hide fields that have no data', () => {
(useExistingFieldsReader as jest.Mock).mockImplementationOnce(() => {