-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status #217230
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
[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status #217230
Conversation
…b.com:dmlemeshko/kibana into alerts-table/update-dts-based-on-loading-prop
…b.com:dmlemeshko/kibana into alerts-table/update-dts-based-on-loading-prop
This reverts commit f34e475.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice improvement, thank you for doing this!!
LGTM for the @elastic/security-threat-hunting-investigations team
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defend Workflows changes LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloud_security_posture
changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thanks!
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @dmlemeshko |
Starting backport for target branches: 8.x, 9.0 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…sed on loading status (elastic#217230) ## Summary Follow-up to elastic#217153 ### Problem Description In UI tests, there was no reliable way to determine when the Alerts table content had fully loaded before interacting with it. This could lead to flaky tests where interactions occurred before the data was available (rows are not present yet), causing failures or inconsistent results (checking for row with specific content to exist)  Quite often we see tests waiting for global indicator (spinner in the top left corner) to be hidden as a condition for page loading is complete. This is quite unreliable approach and testing tools have no consistent built-in solution: FTR, Cypress or even Playwright - network idle wait is officially marked as [discouraged](https://playwright.dev/docs/api/class-page)). We need to help testing tool to interact with UI components in ready state only. ### Solution To address this issue, I modified a `data-test-subj` property in the `<EuiDataGrid>` component. The property dynamically switches between `alertsTableIsLoading` when data is still loading and `alertsTableIsLoaded `once the content is available. This allows UI tests to wait for precisely `alertsTableIsLoaded` to be in in the DOM before interacting with the table, ensuring more reliable and stable test execution. Passed 10/10 <img width="538" alt="image" src="https://github.com/user-attachments/assets/e44bae5f-4094-4ed2-89f3-74a52cb2be53" /> (cherry picked from commit edf8d6d) # Conflicts: # x-pack/test/functional/services/observability/alerts/common.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…rid based on loading status (#217230) (#218243) # Backport This will backport the following commits from `main` to `8.x`: - [[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230)](#217230) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-04-15T11:05:49Z","message":"[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230)\n\n## Summary\n\nFollow-up to #217153\n\n### Problem Description\nIn UI tests, there was no reliable way to determine when the Alerts\ntable content had fully loaded before interacting with it. This could\nlead to flaky tests where interactions occurred before the data was\navailable (rows are not present yet), causing failures or inconsistent\nresults (checking for row with specific content to exist)\n\n\n\n\nQuite often we see tests waiting for global indicator (spinner in the\ntop left corner) to be hidden as a condition for page loading is\ncomplete. This is quite unreliable approach and testing tools have no\nconsistent built-in solution: FTR, Cypress or even Playwright - network\nidle wait is officially marked as\n[discouraged](https://playwright.dev/docs/api/class-page)).\nWe need to help testing tool to interact with UI components in ready\nstate only.\n\n\n### Solution\nTo address this issue, I modified a `data-test-subj` property in the\n`<EuiDataGrid>` component. The property dynamically switches between\n`alertsTableIsLoading` when data is still loading and\n`alertsTableIsLoaded `once the content is available. This allows UI\ntests to wait for precisely `alertsTableIsLoaded` to be in in the DOM\nbefore interacting with the table, ensuring more reliable and stable\ntest execution.\n\n\nPassed 10/10\n<img width=\"538\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e44bae5f-4094-4ed2-89f3-74a52cb2be53\"\n/>","sha":"edf8d6d975f7ae2bd4df8a469bc391ca602ddc1e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.0.1"],"title":"[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status","number":217230,"url":"https://github.com/elastic/kibana/pull/217230","mergeCommit":{"message":"[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230)\n\n## Summary\n\nFollow-up to #217153\n\n### Problem Description\nIn UI tests, there was no reliable way to determine when the Alerts\ntable content had fully loaded before interacting with it. This could\nlead to flaky tests where interactions occurred before the data was\navailable (rows are not present yet), causing failures or inconsistent\nresults (checking for row with specific content to exist)\n\n\n\n\nQuite often we see tests waiting for global indicator (spinner in the\ntop left corner) to be hidden as a condition for page loading is\ncomplete. This is quite unreliable approach and testing tools have no\nconsistent built-in solution: FTR, Cypress or even Playwright - network\nidle wait is officially marked as\n[discouraged](https://playwright.dev/docs/api/class-page)).\nWe need to help testing tool to interact with UI components in ready\nstate only.\n\n\n### Solution\nTo address this issue, I modified a `data-test-subj` property in the\n`<EuiDataGrid>` component. The property dynamically switches between\n`alertsTableIsLoading` when data is still loading and\n`alertsTableIsLoaded `once the content is available. This allows UI\ntests to wait for precisely `alertsTableIsLoaded` to be in in the DOM\nbefore interacting with the table, ensuring more reliable and stable\ntest execution.\n\n\nPassed 10/10\n<img width=\"538\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e44bae5f-4094-4ed2-89f3-74a52cb2be53\"\n/>","sha":"edf8d6d975f7ae2bd4df8a469bc391ca602ddc1e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217230","number":217230,"mergeCommit":{"message":"[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230)\n\n## Summary\n\nFollow-up to #217153\n\n### Problem Description\nIn UI tests, there was no reliable way to determine when the Alerts\ntable content had fully loaded before interacting with it. This could\nlead to flaky tests where interactions occurred before the data was\navailable (rows are not present yet), causing failures or inconsistent\nresults (checking for row with specific content to exist)\n\n\n\n\nQuite often we see tests waiting for global indicator (spinner in the\ntop left corner) to be hidden as a condition for page loading is\ncomplete. This is quite unreliable approach and testing tools have no\nconsistent built-in solution: FTR, Cypress or even Playwright - network\nidle wait is officially marked as\n[discouraged](https://playwright.dev/docs/api/class-page)).\nWe need to help testing tool to interact with UI components in ready\nstate only.\n\n\n### Solution\nTo address this issue, I modified a `data-test-subj` property in the\n`<EuiDataGrid>` component. The property dynamically switches between\n`alertsTableIsLoading` when data is still loading and\n`alertsTableIsLoaded `once the content is available. This allows UI\ntests to wait for precisely `alertsTableIsLoaded` to be in in the DOM\nbefore interacting with the table, ensuring more reliable and stable\ntest execution.\n\n\nPassed 10/10\n<img width=\"538\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e44bae5f-4094-4ed2-89f3-74a52cb2be53\"\n/>","sha":"edf8d6d975f7ae2bd4df8a469bc391ca602ddc1e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
Follow-up to #217153
Problem Description
In UI tests, there was no reliable way to determine when the Alerts table content had fully loaded before interacting with it. This could lead to flaky tests where interactions occurred before the data was available (rows are not present yet), causing failures or inconsistent results (checking for row with specific content to exist)
Quite often we see tests waiting for global indicator (spinner in the top left corner) to be hidden as a condition for page loading is complete. This is quite unreliable approach and testing tools have no consistent built-in solution: FTR, Cypress or even Playwright - network idle wait is officially marked as discouraged).
We need to help testing tool to interact with UI components in ready state only.
Solution
To address this issue, I modified a
data-test-subj
property in the<EuiDataGrid>
component. The property dynamically switches betweenalertsTableIsLoading
when data is still loading andalertsTableIsLoaded
once the content is available. This allows UI tests to wait for preciselyalertsTableIsLoaded
to be in in the DOM before interacting with the table, ensuring more reliable and stable test execution.Passed 10/10
