kibana/test/api_integration
Yulia Čech 879b101669
[Guided onboarding] Update header button logic (#144634)
## Summary
Fixes https://github.com/elastic/kibana/issues/141129
Fixes https://github.com/elastic/kibana/issues/144515

This PR introduces a new state to the guided onboarding plugin. The
state keeps track of the `creationDate` and of the overall `status` of
the plugin. The creation date allows us to detect an "active" period
during which the header button will be displayed more prominently in the
header. Currently, the active period is set to 30 days. During this
time, if the user has not started any guide, has quit a guide before
completion or skipped the guide on the landing page, the header button
will be displayed and when clicked, redirect the user to the landing
page to start/continue a guide.
Also this PR adds a check for Cloud deployments and prevents the code
from sending any API requests when not on Cloud, because guided
onboarding is disabled on prem.

#### Screenshot 
<img width="298" alt="Screenshot 2022-11-10 at 18 42 18"
src="https://user-images.githubusercontent.com/6585477/201168414-391a7cd4-0709-492b-9001-1432b5bed3c8.png">



### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-14 16:50:10 -07:00
..
apis [Guided onboarding] Update header button logic (#144634) 2022-11-14 16:50:10 -07:00
fixtures Bump field limit for esArchiver indices using kibana package version template var (#144272) 2022-11-01 15:00:29 -06:00
services fix all violations 2022-04-16 01:37:30 -05:00
config.js Support brotli compression on the server side (#142334) 2022-10-24 15:33:21 +02:00
ftr_provider_context.d.ts [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
jest.config.js [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00