mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
## Summary This PR updates FTR functional tests shared b/w projects to use SAML authentication instead of login with default user and kibana `/login` route. Few notes for reviewers: - admin role was added to each project roles.yml file and its definition matches cloud one. - please check your tests if selected role is as expected: the goal is to run test with the role that has minimal required permissions, but some tests were failing with lower access role: - `viewer` - read only - `editor` / `developer` for write actions (e.g. save search) - `admin` if full access required - svl_common_page.ts was updated: - `cleanBrowserState()` is added to reset state b/w test suites by deleting all cookies, clearing session & local storages. - `loginWithRole(role: string)` starts with `cleanBrowserState()` call, then sets the new cookie based on provided role and validates the role is applied correctly. On its finish browser is at Kibana home screen. - `loginAsAdmin()` and `loginWithPrivilegedRole()` to login as admin and editor/developer roles. - `forceLogout()` is only required in tests that use basic authentication. It starts with `cleanBrowserState()` call and then loads `/logout` route (we can't load base url because mock-id-plugin will trigger redirects). On its finish browser is at Cloud login screen. For @elastic/kibana-operations : This change affects the login in the functional serverless tests (18 config files at the moment) and while it seems to be stable enough, it might be the reason of sudden flakiness/failures on CI. [Flaky-test-runner 60x](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5107) to verify login via cookie is stable --------- Co-authored-by: Robert Oskamp <traeluki@gmail.com> |
||
---|---|---|
.. | ||
lib | ||
services | ||
types | ||
config.base.ts |