Skip to content
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

[AO] Fix add_to_case functional test #163155

Merged

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Aug 4, 2023

Fixes #156312, fixes #156677, fixes #156928, fixes #156929, fixes #156588

Summary

Fixes the functional test based on @dmlemeshko 's suggestion.

Flaky test runner [50]: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2776
Flaky test runner [200]: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2804
Flaky test runner [200]: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2843
--> After the last change related to redirect, failures in this test are related to #163427

[DONE] [On hold] Will merge it after investigating #156588 to make sure all the related issues are fixed for this function test.

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi maryam-saeidi changed the title Fix functional test [AO] Fix add_to_case functional test Aug 4, 2023
@maryam-saeidi maryam-saeidi marked this pull request as ready for review August 4, 2023 12:25
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner August 4, 2023 12:25
@maryam-saeidi maryam-saeidi self-assigned this Aug 4, 2023
@maryam-saeidi maryam-saeidi added the release_note:skip Skip the PR/issue when compiling release notes label Aug 4, 2023
@maryam-saeidi maryam-saeidi marked this pull request as draft August 7, 2023 17:48
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 1.0MB 1.0MB +42.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi marked this pull request as ready for review August 10, 2023 14:43
@maryam-saeidi maryam-saeidi merged commit b97059c into elastic:main Aug 10, 2023
@maryam-saeidi maryam-saeidi deleted the 156312-fix-cases-functional-test branch August 10, 2023 14:56
@kibanamachine kibanamachine added v8.10.0 backport:skip This commit does not require backporting labels Aug 10, 2023
jloleysens added a commit to jloleysens/kibana that referenced this pull request Aug 10, 2023
* main: (108 commits)
  [Telemetry Schema Validation] Allow `null` on `string` (elastic#163499)
  [Search] Add Slack and Gmail connectors (elastic#163321)
  [ML] Provide hints for empty fields in dropdown options in Anomaly detection & Transform creation wizards, Change point detection view (elastic#163371)
  chore(slo): Add response required fields (elastic#163430)
  [AO] Fix add_to_case functional test (elastic#163155)
  unskip license type functional test (elastic#163199)
  fix(NA): yarn env vars for node_modules mirrors (elastic#163549)
  [Response Ops][Task Manager] Expose SLI metrics in HTTP API (elastic#162178)
  [Logs UI] Adapt test to ES highlighting changes and unskip (elastic#163592)
  [Infra UI] Implement Telemetry on 'Show' buttons within Inventory (elastic#163587)
  [Enterprise Search]Migrate all usages of EuiPage*_Deprecated (elastic#163482)
  fix(slo): settings and access for serverless (elastic#163514)
  [Infra UI] Implement telemetry for the asset details flyout (elastic#163078)
  [Fleet] Add a banner to the top of the Kafka Output UI to say that Elastic Defend integration is not supported (elastic#163579)
  [Fleet] Re-enable and fix Fleet policy secret integration tests (elastic#163428)
  [Fleet] add managed to imported saved object (elastic#163526)
  [Index Management] Disable index actions using contextRef (elastic#163475)
  [Discover] Inline shard failures warnings (elastic#161271)
  [Security Solution][Detection engine] skips geo_point non-ecs validation (elastic#163487)
  Update EUI layout components in bfetch example plugin (elastic#163490)
  ...
@@ -24,7 +26,8 @@ export function ObservabilityUsersProvider({ getPageObject, getService }: FtrPro
*/
const setTestUserRole = async (roleDefinition: CreateRolePayload) => {
// return to neutral grounds to avoid running into permission problems on reload
await commonPageObject.navigateToActualUrl('kibana');
await commonPageObject.navigateToActualUrl('home');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of a race condition, sometimes the redirect happens quickly, and as a result, /home path is compared to /kibana. I removed the extra redirect and added a check after this line to ensure the page is loaded properly before moving to the next step.

This should fix the failure in this part which prevented role creation after this step and as a result, having a not found when deleting the role (AxiosError: Request failed with status code 404)

@sorenlouv sorenlouv added v8.9.2 auto-backport Deprecated - use backport:version if exact versions are needed and removed backport:skip This commit does not require backporting labels Aug 22, 2023
kibanamachine pushed a commit that referenced this pull request Aug 22, 2023
Fixes #156312, fixes #156677, fixes #156928, fixes #156929, fixes
#156588

## Summary

Fixes the functional test based on @dmlemeshko 's suggestion.

Flaky test runner [50]:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2776
Flaky test runner [200]:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2804
Flaky test runner [200]:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2843
--> After the last change related to redirect, failures in this test are
related to #163427

[DONE] ~~**[On hold]** Will merge it after investigating
#156588 to make sure all the
related issues are fixed for this function test.~~

(cherry picked from commit b97059c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.9

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v8.9.2 v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing test: Chrome X-Pack Observability UI Functional Tests.x-pack/test/observability_functional/apps/observability/feature_controls/observability_security·ts - ObservabilityApp feature controls observability security feature controls observability cases read-only privileges "after all" hook for "does not allow a case to be edited" Failing test: Chrome X-Pack Observability UI Functional Tests.x-pack/test/observability_functional/apps/observability/feature_controls/observability_security·ts - ObservabilityApp feature controls observability security feature controls observability cases read-only privileges "before all" hook for "shows observability/cases navlink" Failing test: Chrome X-Pack Observability UI Functional Tests.x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case·ts - ObservabilityApp Observability alerts / Add to case > When user has all privileges for cases renders case options in the overflow menu Failing test: Chrome X-Pack Observability UI Functional Tests.x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case·ts - ObservabilityApp Observability alerts / Add to case > When user has all privileges for cases "after all" hook for "opens a modal when Add to existing case is clicked" Failing test: Chrome X-Pack Observability UI Functional Tests.x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case·ts - ObservabilityApp Observability alerts / Add to case > When user has all privileges for cases opens a modal when Add to existing case is clicked
6 participants