[Lens] Wait for ignore-global-filters indicator with existOrFail - #290344
Conversation
Fixes #289597 Replace a boolean testSubjects.exists() assertion (2.5s window) with existOrFail(), which waits up to timeouts.try for the displayed indicator. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
/flaky ftrConfig:x-pack/platform/test/functional/apps/lens/group2/config.ts:30
|
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#14310
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#14310[❌] x-pack/platform/test/functional/apps/lens/group2/config.ts: 29/30 tests passed. |
🏷️ Release and backport labelsThe targeted How release-note and backport labels were chosenApplied
|
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
Test Failures |
|
Starting backport for target branches: 8.19, 9.4, 9.5 |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#290344) (#290513) # Backport This will backport the following commits from `main` to `9.5`: - [[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)](#290344) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kibana Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-09-11T10:34:08Z","message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","flaky-test-fixer","flaky-fix-check:passed","v9.6.0"],"title":"[Lens] Wait for ignore-global-filters indicator with existOrFail","number":290344,"url":"https://github.com/elastic/kibana/pull/290344","mergeCommit":{"message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/290344","number":290344,"mergeCommit":{"message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}}]}] BACKPORT--> Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
#290344) (#290512) # Backport This will backport the following commits from `main` to `9.4`: - [[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)](#290344) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kibana Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-09-11T10:34:08Z","message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","flaky-test-fixer","flaky-fix-check:passed","v9.6.0"],"title":"[Lens] Wait for ignore-global-filters indicator with existOrFail","number":290344,"url":"https://github.com/elastic/kibana/pull/290344","mergeCommit":{"message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/290344","number":290344,"mergeCommit":{"message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}}]}] BACKPORT--> Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
…il (#290344) (#290511) # Backport This will backport the following commits from `main` to `8.19`: - [[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)](#290344) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kibana Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-09-11T10:34:08Z","message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","flaky-test-fixer","flaky-fix-check:passed","v9.6.0"],"title":"[Lens] Wait for ignore-global-filters indicator with existOrFail","number":290344,"url":"https://github.com/elastic/kibana/pull/290344","mergeCommit":{"message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/290344","number":290344,"mergeCommit":{"message":"[Lens] Wait for ignore-global-filters indicator with existOrFail (#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the ignore global filters control for a data\nlayer` failed with `expected false to equal true` at\n`layer_actions.ts:71-73`: after toggling\n`lns-layerSettings-ignoreGlobalFilters`, the boolean\n`testSubjects.exists('lns-layerPanel-0 >\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n- `exists()` only polls for its default 2.5s `waitForExists` window,\nwhich races the React re-render of the indicator under CI load.\n- This patch replaces that assertion with `existOrFail(...)`, which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator — the\nterminal readiness signal the assertion reads.\n\n### Context\n- Follows the [failed-test investigator's proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim; the analysis is fresh (posted today, after the latest failure)\nso no re-investigation was needed.\n- The awaited state is deterministically reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already the pattern used for the same indicator\nelsewhere in this file (e.g. line 59), and it checks the *displayed*\nelement via `existsByDisplayedByCssSelector`.\n- Both reported failures are on `kibana-on-merge` (`main`): [build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07) and [build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10), same assertion and signature.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed: `node scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n#### Not verified locally\n\n- This is an FTR test requiring a live Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The assertion change is exercised\nby the PR's CI.\n\n</details>\n\n> [!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa. Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285) for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}}]}] BACKPORT--> Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
Fixes #289597
Summary
should expose the ignore global filters control for a data layerfailed withexpected false to equal trueatlayer_actions.ts:71-73: after togglinglns-layerSettings-ignoreGlobalFilters, the booleantestSubjects.exists('lns-layerPanel-0 > lnsChangeIndexPatternIgnoringFilters')returnedfalse.exists()only polls for its default 2.5swaitForExistswindow, which races the React re-render of the indicator under CI load.existOrFail(...), which waits up totimeouts.try(2 min) for the displayed indicator — the terminal readiness signal the assertion reads.Context
layer.ignoreGlobalFiltersand the layer panel conditionally renders the indicator (layerpanel.tsx), so this is a test-timing issue, not a product bug.existOrFailis already the pattern used for the same indicator elsewhere in this file (e.g. line 59), and it checks the displayed element viaexistsByDisplayedByCssSelector.kibana-on-merge(main): build 108914 (2026-09-07) and build 109337 (2026-09-10), same assertion and signature.Verification
Verified locally
node scripts/eslint x-pack/platform/test/functional/apps/lens/group2/layer_actions.tsNot verified locally
Note
Requested by @kibanamachine. Share feedback in #kibana-qa. Mention
@copilotto make quick changes.