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

[ML] Functional tests - add UI permission tests #76368

Merged
merged 12 commits into from
Sep 4, 2020

Conversation

pheyos
Copy link
Member

@pheyos pheyos commented Sep 1, 2020

Summary

This PR adds automated tests for ML UI permissions with both permission models (ES based and spaces based).

New users and groups

Add the following users with corresponding groups to the security setup:

  • ML_POWERUSER_SPACES
  • ML_VIEWER_SPACES
  • ML_UNAUTHORIZED_SPACES

High level tests

For more details see test step descriptions.

For ML_POWERUSER, ML_POWERUSER_SPACES, ML_VIEWER and ML_VIEWER_SPACES

with no data loaded (empty ML lists)

  • should / should not display the ML file data vis link on the Kibana home page
  • should display the ML entry in Kibana app menu
  • should display elements on ML Overview page correctly

with data loaded (jobs, calendars, filters present)

  • should display elements on Anomaly Detection page correctly
  • should display elements on Single Metric Viewer page correctly
  • should display elements on Anomaly Explorer page correctly
  • should display elements on Data Frame Analytics page correctly
  • should display elements on Data Frame Analytics results view page correctly
  • should display elements on Data Visualizer home page correctly
  • should display elements on Index Data Visualizer page correctly
  • should display elements on File Data Visualizer page correctly
  • should display elements on Settings home page correctly
  • should display elements on Calendar management page correctly
  • should display elements on Filter Lists management page correctly
  • should display elements on Stack Management ML page correctly

For ML_UNAUTHORIZED and ML_UNAUTHORIZED_SPACES:

  • should not allow to access the ML app
  • should not display the ML file data vis link on the Kibana home page
  • should not display the ML entry in Kibana app menu
  • should not allow to access the Stack Management ML page

Services

Besides methods that are added to existing services, there are now also the following new services available:

  • ml.dataFrameAnalyticsResults
  • ml.overviewPage
  • ml.settingsCalendar
  • ml.settingsFilterList
  • ml.commonConfig

Note, that ml.commonConfig is currently only used by the tests created with this PR, but it is planned to extend this service and make other existing tests use it in a follow-up.

Other changes

  • Move row count assertion for table filtering into the service method
  • Move the transform logout to a service method and introduce the same for ML

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@pheyos
Copy link
Member Author

pheyos commented Sep 1, 2020

Checking test stability in a flaky test runner job ... => no failure in 50 runs ✔️

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Great stuff adding these permissions tests in! Just spotted a few minor text edits needed.

@pheyos
Copy link
Member Author

pheyos commented Sep 3, 2020

@elasticmachine merge upstream

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡

@qn895
Copy link
Member

qn895 commented Sep 3, 2020

LGTM 👍

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Latest edits LGTM

@pheyos
Copy link
Member Author

pheyos commented Sep 3, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
ml 8.2MB +5.7KB 8.2MB

History

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

@pheyos pheyos merged commit 6275e72 into elastic:master Sep 4, 2020
@pheyos pheyos deleted the test_spaces_permissions branch September 4, 2020 05:34
pheyos added a commit to pheyos/kibana that referenced this pull request Sep 4, 2020
This PR adds automated tests for ML UI permissions with both permission models (ES based and spaces based).
pheyos added a commit that referenced this pull request Sep 4, 2020
This PR adds automated tests for ML UI permissions with both permission models (ES based and spaces based).
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 4, 2020
…rok/new-patterns-component-use-array

* 'master' of github.com:elastic/kibana: (75 commits)
  Remove legacy ui-apps-mixin (elastic#76604)
  remove unused test_utils (elastic#76528)
  [ML] Functional tests - add UI permission tests (elastic#76368)
  [APM] @ts-error -> @ts-expect-error (elastic#76492)
  [APM] Avoid negative offset for error marker on timeline (elastic#76638)
  [Reporting] rename interfaces to align with task manager integration (elastic#76716)
  Revert back ESO migration for alerting, added try/catch logic to avoid failing Kibana on start (elastic#76220)
  Test reverting "Add plugin status API (elastic#75819)" (elastic#76707)
  [Security Solution][Detections] Removes ML Job Settings SIEM copy and fixes link to ML app for creating custom jobs (elastic#76595)
  [Maps] remove region/coordinate-maps visualizations from sample data (elastic#76399)
  [DOCS] Dashboard-first docs refresh (elastic#76194)
  Updated ServiceNow description in docs and actions management UI to contains correct info (elastic#76344)
  [DOCS] Identifies cloud settings in reporting (elastic#76691)
  [Security Solution] Refactor timeline details to use search strategy (elastic#75591)
  es-archiver: Drop invalid index settings, support --query flag  (elastic#76522)
  [DOCS] Identifies graph settings available on cloud (elastic#76661)
  Add more info about a11y tests (elastic#76045)
  [data.search.SearchSource] Remove legacy ES client APIs. (elastic#75943)
  [release notes] automatically retry on Github API 5xx errors (elastic#76447)
  [es_ui_shared] Fix eslint exhaustive deps rule (elastic#76392)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml release_note:skip Skip the PR/issue when compiling release notes test_ui_functional v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants